At least eight others were wounded when the bombers blew themselves up in the kitchen of Al Zahra mosque after police prevented them from entering the prayer hall packed with worshippers.
The carnage comes at a time Kabul is already on edge following a wave of deadly bombings, which triggered angry public protests calling for the resignation of President Ashraf Ghani's government over spiralling insecurity.
"Terrorist attack on Al Zahra mosque in west of Kabul," ministry spokesman Najib Danish said. "Three civilians and one policeman was killed and eight others were wounded."
The rise of the Islamic State group has raised the spectre of sectarian discord in Afghanistan, something that the Sunni-majority country has largely been spared despite decades of war.
Also Read
Last year Afghanistan witnessed a wave of attacks on Shiites claimed by IS, which considers Shiite Muslims apostates.
The attack occurred as worshippers were preparing for an all-night congregation on a night of Ramadan that holds special significance for Shiites.
The Taliban, Afghanistan's biggest militant group locked in a fierce rivalry with IS, denied it was behind Thursday's attack, with a spokesman saying they do not attack places of worship.
In April the US military dropped its largest non-nuclear bomb ever used on an IS stronghold in eastern Afghanistan, killing dozens of jihadists, but the group still appears to be resilient.
Islamic State fighters this week captured Tora Bora, a mountain cave complex in eastern Afghanistan that was once the hideout of Osama bin Laden, despite pressure on the jihadists from US-led forces.
Kabul has been on edge since a massive truck bomb on May 31 killed more than 150 people and wounded hundreds in the city's fortified diplomatic quarter, the deadliest attack in the Afghan capital since 2001.
Separately, suicide bombers tore through a row of mourners at the funeral for one of the protesters, killing at least seven more people.
The carnage during the holy fasting month of Ramadan has left the Afghan capital shaken, with anti-government protesters incensed by the violence setting up a sit-in camp close to the May 31 bombing site.
Disclaimer: No Business Standard Journalist was involved in creation of this content