Some 20 people were hurt in the blast at the Abadan refinery, where Mr Ahmadinejad was to inaugurate an expansion project, the Fars news agency said. The explosion was blamed on a "gas leakage" but no other details were provided.
The semi-official Mehr news agency said two people were killed in the explosion, and that Mr Ahmadinejad ordered a special plane to airlift those critically injured to Tehran.
The plant's 400,000 barrels per day output accounts for about 25 per cent of Iran's fuel production.
Fazel Kaebi, an Abadan resident, said he saw ambulances and rescue teams rush to the site shortly after the explosion. He said the townspeople had noticed black smoke coming from the refinery in the past few days, which he speculated could have been from a fire.
Firefighters quickly extinguished the blaze, the reports said, but the extent of the damage was not immediately clear.
Iran is the second largest exporter in the Opec oil group, but it has been struggling to meet local demand for fuel. Its oil sector is under pressure because of sanctions linked to Tehran's controversial nuclear programme, and Iran has been forced to increasingly rely on local expertise for developing its vast oil and gas resources as well as expanding its refining capacity.
The expansion at the Abadan plant is aimed at increasing capacity by about 30 per cent at the century-old plant - the largest of Iran's nine refineries.
During his speech to officials in a nearby hall, broadcast on state television, Mr Ahmadinejad appeared unperturbed about the blast and assailed the country's enemies, saying: "The hopes of Iran's enemies in imposing pressure through restrictions on the sale of oil products have turned into a complete disappointment."
Mr Ahmadinejad recently took over the oil ministry's portfolio, serving as its caretaker minister, after the government merged eight ministries into four as part of a plan to slim down the bureaucracy.
His stewardship of the country's most vital sector, however, has stoked criticism, with the constitutional watchdog, the Guardian Council, ruling this week that he cannot serve as the caretaker of the ministry.
Hamid Reza Katouzian, a member of the Iranian parliament's energy committee, insisted that the blast was not an act of sabotage, but a result "of a lack of readiness at the refinery".
Abadan governor Hamid Ghanaati later told the official IRNA news agency that only one person died in the explosion and also insisted it wasn't sabotage.