They broke out around 04:00 on Saturday (20:00 GMT Friday) at one of the country’s largest refining and petrochemical plants.
Flames could be seen engulfing parts of the sprawling complex and spewing thick columns of black smoke into the sky.
Shanghai is China’s economic hub and only recently emerged from a strict pandemic lockdown lasting two months.
The cause of the fires, which affected an ethylene glycol facility, is still unclear.
Sinopec – the state-owned company that operates the plant in the suburb of Jinshan – said the driver of a transport vehicle had been killed and a company employee had been injured.
Residents living up to 6km (four miles) away reported hearing an explosion, local media report.
Shanghai’s fire department dispatched more than 500 personnel to the scene.
State media say the fires are now under control but protective burning is being carried out.
Drone footage shared on social media showed the sky above Shanghai, China’s most populous city, turning black from smoke.
Sinopec said it was monitoring for environmental impact and no damage to the surrounding water environment had been recorded.
The ministry of emergency management has dispatched an expert group to the scene.
Shanghai had been under a strict lockdown imposed by officials to curb a coronavirus outbreak driven by the spread of the Omicron variant.
For two months residents in the global trading hub were forbidden from leaving their homes – shutting down factories with far-reaching consequences for both the local economy and global supply chains.
The government is pursuing a “zero Covid” policy requiring everyone who catches the virus to quarantine.
New rules have now been introduced with residents required to show a green health code on their smartphone to leave their residential compounds and to enter most places.