The attack was on a main road near Baquba, capital of the volatile Diyala province, a large and religiously mixed region which has suffered some of the worst sectarian violence since the US-led invasion in 2003.
The identity of the victims and possible motives behind the attack were not immediately clear, police said. But sectarian killings occur regularly in Baquba and across Diyala.
Police said the youngest victim had not yet turned one. The parents of the four children were also killed.
The shooting of children is still rare in Iraq despite the extent of violence across the country.
The US military has sent more than 3,000 extra troops to Diyala to try to curb the violence there.
Thousands of extra U.S. and Iraqi troops are also being deployed around Baghdad in a bid to stop Iraq from sliding into all-out sectarian civil war.
But insurgents have shifted their focus away from the capital into outlying areas since that security crackdown began in mid-February.
REUTERS DS BD1800