Emergency services found the building filled with smoke when they arrived at the scene in Bath Street, Portobello, Edinburgh, after the alarm was raised.
Firefighters used ladders and specialist high-reach equipment to rescue six residents, including the two children, from the upper floors.
Four residents were led to safety from the ground floor level of the five-storey building.
The 10 people were all treated for mild smoke inhalation by firefighters and ambulance service personnel but did not need to go to hospital.
The fire, on Sunday evening, was in the close of the tenement and was quickly extinguished by fire crews.
Group manager Jimmy Melvin of the Scottish Fire and Rescue Service said: "The heavy smoke logging within the common area of this block of flats caused the residents a great deal of distress and disruption.
"The first attending crews worked quickly to lead 10 residents to safety while the fire was extinguished and the area made safe.
"Some residents were reassured by firefighters at the scene and remained within their homes, taking advice from firefighters to seal doorways to prevent smoke entering and to move to a safe room within the flat."
He added: "Residents should avoid at any costs placing refuse, or any combustible material in these common areas, as this increases the risk to fires starting."