Dramatic footage shows cops kicking down doors and evacuating families from smoke-filled flats.
The quick-thinking officers have been praised for their "life-saving" actions.
Can't see the video? Watch it here
The footage from the officers' own body-worn cameras shows them using fire extinguishers to batter down the doors of flats and helping to evacuate residents - including young children.
The drama began just before 6.40pm last Saturday evening in Harrow, north west London.
The officers were answering reports of a fire behind shops on Cranleigh Gardens, and immediately called London Fire Brigade.
But residents in flats above and next to the shops were unaware of the danger.
The officers forced their way into the flats and ran from door to door raising the alarm before hurrying residents to safety.
They were assisted by a brave passer-by who worked with them to get the occupants out of danger.
All the residents were safely evacuated. Some were treated for the effects of smoke inhalation by paramedics at the scene.
The two officers were also treated at the scene for smoke inhalation.
Firefighters quickly got the blaze under control, with only minor damage to the flats.
Acting Chief Inspector James Noble praised the officers who have not been named.
He said: “I am incredibly proud of the actions of these two officers, thanks to their quick-thinking nobody was seriously injured.
"Their actions demonstrate the commitment our officers have to protecting the members of the public, who, in this case, had no idea there was a fire in the building beneath them, until our officers raised the alarm.
“My thanks as well to the brave member of the public who assisted my officers."
He added: “Thankfully the officers were not seriously harmed and are back out on duty.”
A London Fire Brigade spokesman said: "Four fire engines and around 21 firefighters dealt with a shop fire.
"Eight people self evacuated from the flats above before firefighters arrived.
"Part of the ground floor was damaged by the blaze. A number of white goods stored in the courtyard were also damaged by fire.
"The Brigade was called at 6.39pm and the fire was under control by 7.34pm. Fire crews from Stanmore, Wembley and Harrow fire stations were at the scene."
He added: "The cause of the fire is under investigation."