The 70 patients affected were moved to secure temporary sleeping areas, said Barnet, Enfield and Haringey Mental Health NHS Trust.
A fire alarm was sounded at Camlet 3, which is a unit for people with mental health problems referred to the NHS by courts.
The fire was detected at around 18.30 last night in an external staircase and there was no breach of security, a statement said. There were no casualties.
It took 20 fire engines and 100 firefighters to contain the blaze, which severely damaged the roof and first floor of the building and also damaged part of the ground floor.
London Fire Brigade has begun an investigation into the cause of the fire.