Smoke billowed from a spare parts warehouse on the site at Baiji, 210km (130 miles) north of Baghdad, security and refinery sources told Reuters.
Government forces have made new air strikes on militants advancing towards the capital.
Fighting is also reported in the western city of Ramadi.
The government is battling to push back ISIS (Islamic State in Iraq and the Levant) and its Sunni Muslim allies in Diyala and Salahuddin provinces, after the militants overran the second city, Mosul, last week.
Prime Minister Nouri al-Maliki appeared on television with Sunni Muslim and Kurdish leaders on Tuesday to issue a call for national unity in the face of the advance – they demanded that non-state forces lay down their arms.
However, such a call is unlikely to have much effect as Mr Maliki has openly sponsored the formation of Shia Muslim militias to fight alongside regular Iraqi troops, the BBC’s Jim Muir reports from Irbil in northern Iraq.
Hundreds of people have been killed since the start of the militant offensive last week, many of them believed to be captured soldiers publicly shot by ISIS-led firing squads.
During fighting in the city of Baquba this week, 44 prisoners were killed inside a police station in unclear circumstances.