The truck was collecting rubbish in Ravenswood when the driver noticed the fire had started in the back of the vehicle.
The driver emptied the load onto the road in a nearby cul-de-sac and covered the wastewater drains in the area.
The blaze started when a single lithium battery ignited as it passed through the truck's compactor.
There was no damage to the vehicle which was carrying more than six tonnes of rubbish.
"The contractors have to be careful to block sumps and drainage systems to prevent the water and fire-fighting chemicals used to douse the flames from getting into our stormwater system and polluting surface water and the soil.
"If it is a major fire, then there is more risk to the environment as more water will have to be used and there’s more chance it will enter waterways or drains.”
Instead of putting them in the rubbish, people should take their used batteries to a collection point at the Southbrook Resource Recovery Park or Oxford Transfer Station.
"It’s free to drop off household hazardous wastes at both sites, but we don’t take commercial quantities," Waghorn said.
"We accept both non-rechargeable and rechargeable ‘small’ household batteries - up to battery tool size - as well as lead-acid and gel batteries from standard vehicles."