The fire started just after midday at a warehouse of the factory in Shanghai's suburban Fengxian district, Xinhua said.
"The collapse of a factory building's main beam has led to the deaths of three firefighters and the injuring of nine others," it quoted witnesses as saying.
More than 50 fire engines were working on the scene, Xinhua said.
"Environmental protection authorities have been monitoring the air conditions and residents on the leeward side have been evacuated," it added.