The Taliban claimed responsibility for the attack, but NATO and Afghan officials had not confirmed their involvement, CNN reported.
The gunman who shot the officers -- a colonel and a major -- had not been caught.
"This act is unacceptable, and the United States condemns it in the strongest possible terms," U.S. Defense Department press secretary George Little said in a statement.
U.S. Defense Secretary Leon Panetta called on the Afghan government "to take decisive action to protect coalition forces and curtail the violence in Afghanistan after a challenging week in the country."
After the attack, Gen. John Allen, the head of NATO forces in Afghanistan, ordered all International Security Assistance Forces to withdraw from government ministries in Kabul as a precaution.
"The perpetrator of this attack is a coward whose actions will not go unanswered," Allen said.
A Taliban spokesman said the attack was in retaliation for the recent burning of Korans at a U.S. base.
Elsewhere in Afghanistan, seven people were killed and dozens injured Saturday in the fifth day of protests over the Koran burnings, officials said.
Four people were killed and dozens injured in Kunduz, doctors said, and part of a U.N. compound in the city was set afire, the BBC reported.
Gulam Mohamad Farhad, the head of intelligent in Kunduz, said protesters attempted to burn down the U.N. building, CNN reported.
Three other people were killed in the southern province of Logar, the BBC said.
The British broadcaster said more than 20 people have died since the protests began Tuesday.
Authorities said at least 15 protesters were injured when hundreds attempted to attack the governor's house and office in Laghman province.
Two civilians and an officer were in critical condition, a local police chief said.
The latest protests came a day after Allen urged calm.
U.S. officials, including President Obama, have apologized for the burning of the Korans at Bagram air base near Kabul, saying it was an "inadvertent" error.
An Interior Ministry spokesman said protests also took place Saturday in provinces including Paktika, Baghlan and Nurestan.
Most protests in northern regions were peaceful, police spokesman Lal Mohamed Ahmadzai said.
Two U.S. soldiers were killed at a military base Thursday by a man wearing an Afghan National Army uniform while a protest over the Koran burnings was taking place outside.
Notable deaths of 2014 [PHOTOS]