Large metal drums filled with chemicals have been thrown into the air from deep within the blaze, posing a danger to the 180 firefighters battling the flames.
An explosion sparked the fire at the chemical factory in Derrimut, west of the CBD, about 11.20am on Wednesday and was brought under control about 3.30pm.
No injuries have been reported and it is believed everyone inside the building was evacuated safely, Victoria Police said.
Hazardous material and unknown toxins are burning according to Fire Rescue Victoria, with the Western Freeway closed near the area for health reasons.
"We don't know what's in that smoke - smoke is toxic and will cause damage," firefighter Michelle Cowling told reporters at the scene.
The blaze was Melbourne's most significant in several years and would likely burn for days, she said.
"We've got embers burning, fire burning - until we can get close enough even with our aerial appliances that are on site and specialist hazmat people on site we can't get in close enough to cool this fire down," she said.
Toxic smoke from a significant factory fire in Melbourne is expected to rage for days. (James Ross/AAP PHOTOS)
The fire does not appear to have spread to nearby buildings.
One worker died and two were injured in a fire at the same building in October 2023, which was also sparked by an explosion.
The factory is in an industrial park and houses several businesses, with everyone in neighbouring buildings evacuated.
A watch and act alert was issued for residents and workers in Derrimut, Laverton North, Sunshine West and Truganina.
"Wind is blowing toxic smoke towards the east across Derrimut," the alert stated.
A significant amount of back smoke is visible around Derrimut and Sunshine West, due to a factory fire. Motorists in the area, including the Western Freeway and M80 Ring Road, should keep their ventilation on recirculate and windows up. — VicTraffic (@VicTraffic) #victraffic pic.twitter.com/8G8YJFzAcyJuly 10, 2024
"Anyone located in the area affected by smoke should take shelter indoors immediately."
The Environmental Protection Authority also issued an air quality notice and advised anyone with breathing difficulties to ring triple zero.
Drivers in the area have been told to keep their windows up to avoid breathing smoke and not to slow down to view the fire.
The factory is close to a gas pipeline but emergency services have not issued any alerts over the infrastructure.
Paramedics remain at the scene but have not yet treated any patients.