"This act is unacceptable, and the United States condemns it in the strongest possible terms," said Defence Secretary Leon Panetta's spokesman George Little.
The two Americans, working as International Security Assistance Force officers in the NATO coalition, were in the interior ministry when "an individual" turned his weapon against the pair, NATO said, without giving further details.
Taliban insurgents claimed responsibility for the shooting, saying it was in revenge for the burning of Qurans at a US-run military base an incident that forced US President Barrack Obama to apologize to the Afghan people.
Little said Afghanistan's Defense Minister Abdul Rahim Wardak telephoned Panetta on Saturday and "apologized for today's incident" and offered condolences to family members of those killed.
The shooting prompted General John Allen, commander of NATO's International Security Assistance Force, to pull all NATO staff out of Afghan government ministries, a move Panetta supported.
"The secretary supports the decision General Allen made to protect our forces by immediately recalling ISAF personnel working in ministries around Kabul." Panetta urged Wardak and "the Afghan government to take decisive action to protect coalition forces and curtail the violence in Afghanistan after a challenging week in the country," Little said.
Wardak also assured his American counterpart that Afghan President Hamid Karzai "was assembling the religious leaders, parliamentarians, justices of the Supreme Court, and other senior Afghan officials to take urgent steps to do so," the spokesman added.