Authorities said the attack was carried out by an Afghan employee of the U.S. government who was killed in the incident. The assault was the third high-profile attack in the past two weeks in the Afghan capital.
Gunfire was first heard sometime after 8 p.m. local time around the former Ariana Hotel, a building that ex-U.S. intelligence officials said is the CIA station in Kabul.
No information has been given about the American killed. A wounded man was taken to a military hospital.
Investigators are trying to determine a motive for the attack. Embassy spokesman Gavin Sundwall declined to comment on what the targeted annex was used for, citing security reasons.
The Afghan employee was not authorized to carry a weapon, according to Sundwall, and it was not clear how the man was able to get a gun into the secured compound.
The Associated Press contributed to this report.