Crews were called to the flat in Brunswick Road just before 01:00 after a neighbour reported smoke coming from underneath a door.
They helped the two men, aged 50 and 22, to safety.
The men were suffering from smoke inhalation but did not go to hospital.
Firefighters have led two men to safety after a blaze broke out in the kitchen of a flat in Edinburgh.