Thomas Schweich said Mr Karzai had protected drug lords for political reasons and tolerated "a certain level of corruption" rather than lose power.
He said the former attorney-general had told him the president had prevented the prosecution of some 20 officials.
Mr Karzai has denied the claims, saying his government had cut drug production.
"Nobody has done as well as us in the last seven years in the field of counter-narcotics," he told reporters.
The president said his government had eradicated or greatly reduced drug production in more than half of the country's provinces.
But Mr Schweich, who until June was the US state department's co-ordinator for counter-narcotics and justice reform in Afghanistan, said such claims "ignore reality".
"The poppy cultivation right now is up and around 200,000 hectares - that's the biggest narco-crop in history," he told the BBC.
"The fact that it's become concentrated in five or six provinces doesn't change the fact that you have a massive, massive opium problem."
He added: "The attorney-general, who was just fired, told me he had a list of 20 corrupt officials who he was not allowed to prosecute."
Mr Schweich also echoed claims that Nato and US commanders had been reluctant to get involved in fighting drugs, fearing that destroying farmers' crops would alienate tribesmen in the south and increase support for the insurgents.
Mr Karzai has said he plans to run for office again next year
"[Mr Karzai] perceives that there are certain people he cannot crack down on and that it is better to tolerate a certain level of corruption than to take an aggressive stand and lose power," he added.
But Mr Karzai denied his supporters were involved in smuggling.
"I don't blame Afghans for drugs smuggling. They may do it due to helplessness and there may be only a few of them," he said.
In an article in the New York Times Magazine on Sunday, Mr Schweich also accused the US defence department and military commanders from its Nato ally Britain of obstructing attempts to eradicate the opium crop.
"Some of our Nato allies have resisted the anti-opium offensive, as has our own Defense Department, which tends to see counter-narcotics as other people's business to be settled once the war-fighting is over," he wrote.
Mr Schweich claimed Britain had urged Mr Karzai to reject a US state department plan to stamp out poppy cultivation.
"Although Britain's foreign office strongly backed anti-narcotics efforts (with the exception of aerial eradication), the British military were even more hostile to the anti-drug mission than the US military," he wrote. The claims come as Mr Karzai prepares to run for another term in office in next year's Afghan presidential elections.
Mr Schweich wrote: "Karzai was playing us like a fiddle. The US would spend billions of dollars on infrastructure development; the US and its allies would fight the Taliban; Karzai's friends could get richer off the drug trade; he could blame the West for his problems; and in 2009 he would be elected to a new term."
The United Nations says that enough opium was produced last year in Afghanistan to make more than 880 tonnes of heroin with a street value of $4bn ($2bn).
A British Foreign Office spokesman said: "Drugs pose a threat to the future of Afghanistan, and the UK is one of the leaders in international efforts to combat the narcotics trade.
"We are committed for the long haul in this challenging endeavour, through a two-pronged approach, to tackle both supply and demand."
A US state department spokesman defended the country's support of President Karzai, saying he was working to help improve the plight of Afghanistan.