KABUL—The U.S., which has spent billions of dollars on counternarcotics in Afghanistan, has fired a number of people from its embassy in Kabul for allegedly using and selling drugs on its premises, a U.S. State Department official said Wednesday.

Embassy personnel said the investigation was launched after staff noticed one person wandering around in a state of confusion and appearing to be intoxicated.

“The...