“Both the American taxpayers, and Zambian citizens, deserve a privileged, two-way partnership, not a one-way donation that works out to $200 million per meeting with the head of state,” Mr. Foote wrote.

The administration of Mr. Lungu, who was elected in 2015 after his predecessor died in office, has been widely criticized as corrupt. One Zambian analyst recently called it “kleptocratic,” saying that grand corruption had become endemic and that the economy was faltering.

A recent report by the Environmental Investigation Agency, an international organization that investigates environmental crime and abuse, described the president, his daughter and two ministers as central figures in a “cartel” that traffics mukula rosewood trees. It said that the trees were on the verge of commercial extinction.

Mr. Foote had spoken out about corruption in Zambia before.

“His voice is powerful. He had exposed their hypocrisy and corruption,” said the popular musician Fumba Chama, who has repeatedly criticized government corruption in songs like “Koswe Mumpoto,” which means “Rat in the Pot.”

Mr. Chama — whose stage name, Pilato, stands for People In Lyrical Arena Taking Over — has been targeted by the government multiple times. He was last arrested in Livingstone on Saturday while running a workshop on transparency and accountability, charged with unlawful assembly, and released two days later.

He said that the furor over the ambassador’s comments on gay rights was just a pretext and that the real issue was his bold condemnation of corrupt officials.

“They brought up the L.G.B.T. thing because they knew if they brought it to the fore, the public would side with them. Zambia is a very religious country,” Mr. Chama said.