Security forces were trying to subdue three attackers who entered the embassy compound after the bombing, said Najib Danish, a spokesman for the Ministry of the Interior.
A police officer near the scene of the attack said by phone that there were five loud blasts and that gunfire continued afterward. Embassy staff members were evacuated to safety, Mr. Danish said.
ISIS takfiri group claimed responsibility for the attack through its news agency, Amaq. There was no immediate word of casualties.
The attack was at least the third coordinated attack in the city in recent weeks. Just last week, at least 24 people, including 18 employees of the Ministry of Mines, were killed by a Taliban suicide bomber in Kabul.
And a month ago more than 150 people were killed in a truck bombing near the German Embassy that was attributed to the Haqqani wing of the Taliban, though the group denied responsibility. The attack was one of the deadliest in the nearly 16 years since the American-led invasion of Afghanistan.
About 220 people were killed in the first six months of this year in Kabul, the United Nations has said. There were more than 1,000 total casualties over the period, 25 percent more than the same period last year.