Crews were called to a flat in Brunswick Road, Edinburgh, shortly before 1am after a neighbour reported smoke coming from underneath a door.
SCOTSMAN TABLET AND MOBILE APPS
The fire service sent three engines and one height appliance to the scene, where firefighters using breathing equipment got into the property.
They helped the two men, aged 50 and 22, to safety and the incident was over within 20 minutes.
The men, who were suffering from smoke inhalation, were assessed by a paramedic but did not go to hospital, a service spokesman confirmed.