A health ministry spokesman said 14 people had been killed, but other reports have put the toll much higher.
Another blast hit the northern city of Mazar-i-Sharif at about the same time, killing four people.
The attacks appear to be of a sectarian nature unprecedented in recent Afghan history, correspondents say.
It coincided with the Shia Muslim festival of Ashura – the most important day in the Shia calendar and marked with a public holiday in Afghanistan.
The police have cordoned off all roads to the blast site in the medieval Murad Khani district where many Shias had gathered to commemorate Ashura at the Abu Fazal mosque.
The bomb which exploded near the main mosque in Mazar-i-Sharif was apparently strapped to a bicycle, and went off shortly after the Kabul blast.
Balkh province Deputy Police Chief Abdul Raouf Taj said the device exploded as a convoy of Shias, shouting in celebration of Ashura, passed by, the Associated Press news agency reported.
There are tensions between Afghan Sunni and minority Shia Muslims in Afghanistan, but violence of the type seen in Pakistan or Iraq is rare, our correspondent says.
Over the past decade Shias in Afghanistan have celebrated their festivals more confidently, openly and on a bigger scale than ever before.