They said 21 people were wounded, a mix of students and teachers who were arriving for classes at the boys secondary school in Baquba, the capital of volatile Diyala province.
The bomber hid the explosives in a trolley that he had pushed into the school, police said. Most of the boys at the school are teenagers.
Diyala is one of several northern provinces where U.S. and Iraqi forces have been carrying out a series of offensives against al Qaeda in Iraq. The Sunni Islamist group is blamed for most suicide bombings in Iraq.