At least one civilian and two members of the Afghan security forces were killed, a ministry spokesman said, adding that the target appeared to be a police post near military headquarters.
Islamic State, also known as Da'ish, claimed responsibility in an online post.
A police officer at the scene told Reuters the attack appeared to have been carried out by a suicide bomber on foot. A Reuters witness reported seeing several damaged cars, with possible injuries to the occupants.
Attack on Afghanistan: Ex-JI chief had opposed US action
Last month, IS fighters killed nearly 50 people when then stormed the main military hospital in Kabul.
Islamic State's offshoot in Afghanistan, known as the Sunni jihadist group's so-called Khorasan Province, is suspected of carrying out several attacks on minority Shi'ite Muslim targets. US officials say intelligence suggests Islamic State is based overwhelmingly in Nangarhar and neighboring Kunar province.
Estimates of its strength in Afghanistan vary. US officials have said they believe the movement has only 700 fighters but Afghan officials estimate it has about 1,500.
The Afghan Taliban, who are trying to overthrow the US-backed government in Kabul, are fiercely opposed to Da'ish and the two have clashed as they seek to expand territory and influence.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ