The killings took place in Baiji district, around 200 kilometres (125 miles) north of the capital, the official said.
"A group of Daesh (IS) fighters came from the Hamrin mountains, crossed the Tigris river after midnight and attacked the checkpoint at the entrance to the village of Albu Juwari, north of Baiji," he said.
Five members of the family were killed and a sixth was in a critical condition, he said.
Two killed in southern Iraq as protests spread
All were members of a tribal militia operating under the umbrella of the Hashed al-Shaabi (Popular Mobilisation) paramilitary force that has fought the extremists.
IS, which once controlled swathes of Iraq and neighbouring Syria, has been pushed back by multiple offensives and ousted from all of Iraq's towns and cities, including the capital of its self-declared "caliphate", Mosul.
But despite Iraq declaring victory over the extremists in December, they have continued to use sparsely populated areas such as the Hamrin mountains as launchpads for attacks.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ