Aref Noori, a spokesman for the Ghazni governor's office, said a joint military operation by Afghan and Nato troops had been underway in a village southeast of Ghazni city when the bomb struck an armoured military vehicle carrying foreign forces.
In the past several weeks, the insurgents also have launched assaults on villages in rural districts of the province that are populated by minority ethnic Hazara Shias. The attacks sent thousands of residents fleeing to nearby provinces.
The incident killed Sergeant Leandro Jasso, 25, in Nimruz province's Khash Rod district. The operation was somewhat unusual because the coalition said it came against al-Qaeda militants, rather than those of Isis (Islamic State), which are more typically targeted.
The US military said in a statement that Jasso and other US and Afghan soldiers were involved in a close-quarters battle with "multiple barricaded al-Qaeda shooters".
"Sergeant Jasso was killed defending our nation, fighting al-Qaeda alongside our Afghan partners," Miller said in a statement. "All of us, and through our coalition of 41 nations, recognize the threats posed by groups such as al-Qaeda and ISIS and are determined to fight them here."
The coalition first identified Jasso on Monday, but had not previously acknowledged the possibility of friendly fire. He was evacuated from the compound, and later died at a military hospital at Camp Dwyer, a coalition installation in neighboring Helmand province.
Earlier in the month, Army Major Brent Taylor was shot dead in an insider attack in Kabul. Taylor was the mayor of Ogden, Utah, and a member of the Utah Army National Guard.
About 15,000 U.S. troops are deployed to Afghanistan, with most involved in Resolute Support, a US-led Nato mission to train, advise and assist Afghan forces battling the Taliban. A separate counterterrorism mission known as Freedom's Sentinel also is underway, with US Special Operations troops often partnering with Afghan commandos to target the Islamic State and, occasionally, al-Qaeda.
The total number of U.S. military casualties during the 17-year Afghan war has been more than 2400. The great majority of US forces withdrew by the end of 2014, but those still in the country often are involved in supporting combat situations on the ground as well as by air.