The militants killed four people and planted bombs at production units for kerosene and benzene at the refinery in the town of Baiji, a former al Qaeda stronghold about 180 km (112 miles) north of Baghdad, Governor Ahmed al-Jubouri said.
"There is a big fire in the refinery and the refinery has completely stopped," Jubouri told Reuters.
Overall violence in Iraq has dropped sharply since the peak of sectarian conflict in 2006-07, but attacks still occur on a daily basis.
The Baiji refinery was controlled for a long time by al Qaeda militants, who used it to finance the insurgency.
The refinery normally operates at 70 percent of its capacity and produces 11 million litres of gasoline, 7 million litres of benzene and 4.5 million litres of kerosene a day.