Three US service members and an American contractor were also wounded in the blast, the military said, CNN reported.
The names of those killed were not immediately disclosed pending the notification of next of kin.
The Taliban claimed responsibility for the ambush, claiming that a tank was "completely destroyed." The US did not immediately release additional details about the attack, the deadliest against US service members in Afghanistan since six were killed in a motorcycle bomb explosion in December 2015.
The Taliban have been resurgent in the Ghazni area in recent weeks, and the US has sent additional troops into the region to help Afghan forces retain control there. Earlier this month, US Gen. Scott Miller, the head of US and NATO forces in Afghanistan who survived an October firefight in Kandahar, was photographed carrying a fully loaded M4 carbine assault rifle while visiting the Ghazni area.
He's also taken to carrying the rifle while visiting other unsecured areas, an unusual security precaution for a senior general.
Overall, the Taliban have strengthened their grip over the country in recent years.
A recent report released by the US government's own ombudsman of the war found that the Afghan government now controls 56 percent of the districts in the country, down from 72 percent in November 2015. Insurgent influence or control has risen to 12.5 percent of districts from just 7 percent, and approximately a third of Afghanistan is a "contested" area.