The string of grisly discoveries was made at a military base around three kilometres (two miles) from the city that the jihadists "turned into an execution ground", Kirkuk governor Rakan Said said.
"Not less than 400 people were executed," he said, adding that some were clad in the uniform of prisoners condemned to death while others wore civilian clothing.
IS was forced out of Hawija -- 240 kilometres north of Baghdad -- by Iraqi forces in October in a sweeping offensive that has seen the group lose the vast bulk of territory it seized in 2014.
The burial pits near Hawija were discovered "thanks to witness accounts from local residents" given to the Iraqi military, General Mortada al-Luwaibi said.
Saad Abbas, a farmer from the area, told AFP that during the three years of IS control the group's fighters could be seen "driving around in cars with their prisoners".
"They would shoot them and then throw them to the ground or burn their bodies," Abbas said.