The Taliban denied involvement in the blast and there was no immediate claim of responsibility for the attack.
The bombing took place near the government-run defense university, the Marshal Fahim Military Academy, at the beginning of the morning rush hour.
It was the first major attack in the capital this year and comes at a time of heightened uncertainty in the country as U.S. and Taliban negotiators in Qatar try to pursue talks towards a peace deal to end 18 years of war.
"Six people including two civilians and four military personnel were killed," interior ministry spokesman Nasrat Rahimi told Reuters, adding that 12 people were wounded, five of them civilians.
"It wasn't our work," said Taliban spokesman Zabihullah Mujahid in a text message to Reuters.
The academy, modeled after European war colleges to train Afghan cadets, has been the scene of several attacks in the past, including an assault last may claimed by Islamic State.
Despite the relative lull of violence in Kabul, militant attacks on the Afghan and U.S.-led security forces have continued over recent months around the country even as the United States and Taliban militants pursue talks to finalize a peace pact.
Afghan President Ashraf Ghani condemned the attack in a statement released by his office.
"The great nation of Afghanistan wants an end to violence, an end to the war, a ceasefire and an enduring peace," he said."The government is committed to achieving a dignified and sustainable peace, for which it pursues a clear plan."