Police officials say the attackers stormed the house in the al-Rasheed district early Saturday and shot dead Cap. Adnan Ibrahim, his wife and two children, aged eight and 10.
As they were leaving the area, the attackers killed another policeman who tried to stop them at a nearby checkpoint.
A health official confirmed the death toll. Both officials spoke on condition of anonymity because they are not authorized to talk to the media.
Insurgents in Iraq frequently target security force members in an attempt to undermine the Shiite-led government.