District fire chief Pat Gallacher said the flames were burning through the roof at the former Stelwire plant when the first crews arrived.
Thick black smoke could be seen kilometres away.
No firefighters were injured and Gallacher said it was too dangerous for them to return inside because the building has been weakened by previous fires and gutted for structural materials.
He said the litter-covered floors are dotted with machinery pits and sections of floor are missing.
``We fought a purely defensive action, not going inside to attack it because it is not safe,'' he said. ``There was lots of fire on the first floor, up into the second floor.''
Police Insp. Warren Korol said officers routinely flush kids, transients and drug users from the building.
Korol said people have set cooking fires inside the building in the past.
There were fears the smoke could enter the ventilation system of Hamilton General Hospital, which is directly across the street. But Hamilton police Staff Sgt. Bob Watts said fire crews determined there was no danger and no evacuation of patients was ordered.