The bomber detonated his explosives' vest at the service in the Iraqi capital's southwestern suburb of Hay al-Amal, a police official told The Associated Press. At least 43 people were wounded in the explosion.
The militia fighter was killed in battle against the militant group in Iraq's western Anbar province, police said.
No one immediately claimed responsibility for the attack, but the Islamic State militant group has frequently targeted large Shiite gatherings. The radical Sunni group believes that Shiites are apostates who have strayed from Islam.
Since the emergence of IS extremists, Baghdad has seen near-daily attacks, with roadside bombs, suicide blasts and assassinations targeting Iraqi forces and government officials, with significant casualties among the civilian population.
More From This Section
The violence has killed hundreds and displaced tens of thousands of Iraqis.
Also today in Baghdad, a roadside bomb detonated at a Shiite shrine in Sadr City, killing at least five people and wounding 15, police officials said.
Hospital officials confirmed the casualty figures. All officials spoke on condition of anonymity as they were not authorised to talk to reporters.