More than 50 firefighters are tackling the blaze at the mill on Greenfield Lane in Rochdale.
Greater Manchester Fire and Rescue Service said about 30 nearby homes were evacuated as a precaution, as crews worked to stop the flames from spreading.
Bury and Rochdale Magistrates' Court was opened as a shelter, but residents were later allowed to return to their homes.
Pictures from the scene show the building engulfed in fire, with flames visible from miles around. There are no reported injuries.
The fire service said crews were called at just before 10.35pm on Monday.
A spokesman said: "Crews are using handheld jets to control the blaze and are also tackling the fire from height using a hydraulic platform.
"Firefighters are working hard to stop fire spread and protect nearby buildings.
"If you live locally, please ensure windows and doors are closed and avoid the area."
Police have shut the A664 in both directions between Dicken Green and Oldham Road, while road closures are also in place on Milkstone Road and Well I' Th Lane.
Evacuated residents were allowed back to their homes shortly before 1am.