Two people were rescued from the top floor of the four storey Georgian building and two from the ground floor after the alarm was raised
An inflatable tent was erected after the Red Cross were also called in to help deal with dozens of other residents forced to flee the building at 20 Buckingham Terrace near the Stockbridge area of the city.
Lothian and Borders Fire and Rescue Service deployed five pumps to the scene after the blaze spread from the first floor to the second, the worst of the flames said to have been in a space between both levels.
Three relief crews were expected to take over around 8am with a mobile command centre also up and running to control operations.
A spokeswoman for the fire service said: “The incident is still ongoing.”
There were no reports of casualties with those rescued being checked out at the scene by members of the Red Cross.
Fire crews were expected to remain at the scene for several hours while investigations into the cause of the blaze continue.