Spokesman Ferdaws Faramarz said the mosque's imam, Mofti Naiman, was among the dead. Another 15 people were wounded.
The bomb exploded as prayers had begun. No one claimed responsibility for the bombing, but initial police investigations suggest the Imam may have been the target, Faramarz said.
An image circulating on social media showed three bodies lying on the floor of the mosque, which showed minor damage.
The explosion comes on the second day of a three-day ceasefire announced by the warring Taliban and Afghan government. The pause was for the Islamic festival Eid-al-Fitr, which follows the fasting month of Ramadan.
Until now many of the attacks in the capital have been claimed by the local Islamic State affiliate, but both the Taliban and government blame each other.
The most recent attack last week killed over 90 people, many of them pupils leaving a girls'' school when a powerful car bomb exploded. The Taliban denied involvement and condemned the attack.
The relentless violence comes as the U.S. and allied NATO forces continue with their final withdrawal from Afghanistan after nearly 20 years of war.
Just this week the last of the US troops left southern Kandahar Air Base, while some NATO troops still remained. At the war's peak more than 30,000 US troops were stationed in Kandahar, the Taliban heartland.