The blaze began in the pump house of Salina Cruz, Mexico's largest refinery, on Wednesday morning, and the company was working to put it out, a Pemex spokeswoman said.
A Pemex spokesman said the fire had not yet reached the refinery's nearby massive storage tanks, adding that efforts were under way to prevent that from happening.
Eight of the injured have been released from the hospital, the company said on its Twitter page.
Images sent by local emergency workers showed a tall, thick plume of black smoke spewing from towering flames at the refinery on the Pacific Coast in the southern state of Oaxaca.
An official at the Oaxaca state emergency services said some of the local neighbourhoods near the refinery had been evacuated.
The fire occurred a day after heavy rains prompted the refinery to suspend operations and evacuate personnel.
It added the blaze had been contained. However, it was unclear when operations might resume.
The refinery has a capacity of 330,000 barrels per day.
For over a year Pemex has been searching for investment partners to boost the aging facility's productivity, but with no takers to date.
(Reporting by Miguel Angel Gutierrez, Ana Isabel Martinez, Anahi Rama and David Alire Garcia; Editing by Jonathan Oatis and W Simon)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.