Thomas Schweich, who until June was one of State Department's top counter-narcotics officials, accused Karzai of protecting drug lords for political reasons.
Schweich wrote in an article for The New York Times that appeared online late Wednesday that "narco-corruption went to the top of the Afghan government."
Afghan officials were not immediately available to respond to Schweich's allegations.
Drug production has skyrocketed since the U.S.-led invasion that ousted the Taliban regime. In 2007, Afghanistan produced 93 percent of the world's supply of opium, the raw material of heroin.
Schweich said the Taliban-led insurgency fighting Karzai's government profits from drugs.
He wrote that Karzai is reluctant to move against big drug lords in his political power base in the country's south, where most opium and heroin is produced.
"Karzai had Taliban enemies who profited from drugs but he had even more supporters who did," wrote Schweich, who used to serve as coordinator for counter-narcotics and justice reform in Afghanistan.
Presidential elections in Afghanistan come next year, and Karzai has indicated he'll seek re-election.
Schweich accused the Pentagon and some U.S. generals of obstructing attempts to get military forces to assist and protect opium crop eradication drives. The crop is a valuable source of funds for the insurgency.
"Karzai was playing us like a fiddle," Schweich wrote.
"The U.S. would spend billions of dollars on infrastructure development; the U.S. and its allies would fight the Taliban; Karzai's friends could get richer off the drug trade," he wrote.
NATO and U.S. military commanders have been reluctant to get involved in the drug fight, arguing that destroying farmers' crops would alienate tribesmen and increase support for the Taliban.
In 2003, about 198,000 acres of land was used to cultivate poppy. By 2007, it rose to 476,900 acres.
Opium production topped 9,000 tons, enough to make over 880 tons of heroin with a street value of $4 billion, according to the United Nations.
Figures for 2008 are not yet available.
The Ministry of Counter Narcotics says that 20 of Afghanistan's 34 provinces will be poppy-free this year - compared with 13 provinces in 2007. But in the south, cultivation remains rampant.