According to the commission a "systemic senior management failure" meant there was not adequate staffing or systems in place to respond to repeated alerts about suspicious behaviour.
Ten incidents were identified in which the high street giant made money from customers who may have been using the proceeds of crime to gamble.
Those occasions – between November 2014 and June 2017 – were regarded as probably "not unique" by the commission.
A total of £3.4m was deposited by the ten identified customers, with William Hill netting a £1.2m profit. This included one customer who was funding a gambling problem by stealing from his employer and another who had defrauded elderly victims.
That £1.2m will be reimbursed to victims, with William Hill agreeing to pay £5m to charitable causes.
Gambling Commission executive director Tim Miller told BBC Breakfast: "William Hill weren't putting sufficient resources in place to meet the really important obligations they have to keep crime out of gambling and to protect vulnerable people.
"Today's decision shows that where they don't take these responsibilities seriously they can face swift and robust regulation."
When asked if similar penalties could be meted out in the future, Miller added: "I think sadly this isn't going to be the last time that we'll be using our powers in this way."
The commission said William Hill allowed one customer to deposit £541,000 over 14 months after staff made the assumption that his potential income could be £365,000 a year based on a verbal conversation and without further questioning.
The man was in fact earning around £30,000 a year and was funding his gambling habit by stealing from his employer.
William Hill's penalty is the second largest handed out by the commission. Last year online firm 888 were hit with a fine of £7.8 million for "serious failings" in the safeguarding of their customers.
Gambling Commission executive director Neil McArthur said it would use the full range of their enforcement powers "to make gambling fairer and safer".
He added: "This was a systemic failing at William Hill which went on for nearly two years and today’s penalty package – which could exceed £6.2m – reflects the seriousness of the breaches.
"Gambling businesses have a responsibility to ensure that they keep crime out of gambling and tackle problem gambling – and as part of that they must be constantly curious about where the money they are taking is coming from."
William Hill will now appoint external auditors to review their anti-money laundering and social responsibility policies and procedures and then share the findings with the wider industry.
Responding to the fine, William Hill chief executive Philip Bowcock said in a statement: "William Hill has fully co-operated with the commission throughout this process, introducing new and improved policies and increased levels of resourcing.
"We have also committed to an independent process review and will work to implement any recommendations that emerge from that review. We are fully committed to operating a sustainable business that properly identifies risk and better protects customers.
"We will continue to assist the commission and work with other operators to improve practices in the areas identified."
By mid morning William Hill's share price had risen 2.1p to 326p.