Islamic State (IS) fighters detained the muezzin, who calls for Muslim prayers, and blew up the Jalawla husseiniyah, a term used for a Shiite place of worship.
"Then they shot him dead in front of his mosque," said the police official for Diyala province, northeast of Baghdad.
Witnesses confirmed the execution, which came four days after IS militants wrested control of the town from Kurdish peshmerga forces following two days of deadly fighting.
Kurdish forces lost at least 10 fighters in the battle for Jalawla, a strategic choke-point 130 kilometres northeast of Baghdad.
The IS's Sunni extremist fighters conquered large swathes of Iraq's Sunni heartland in June, while Diyala province is mixed.