Firefighters were called to the blaze at the property on the corner of Cutton and Bathgate Streets shortly before midnight, with the residents lucky to escape unharmed.
"Fortunately the three occupants of the front flat were awake at the time and managed to awake the occupants of the rear flat and all escaped, no injury," says southern fire shift manager Andrew Norris.
It's believed the fire, which took four crews to bring under control, was sparked by an electric heater left too close to a bed.
Dunedin City Council engineers will now check the safety of the building to see if it needs to be demolished.
"[I was] woken up by the police knocking on my door repetitively, as loud as they possibly could," says neighbour Regan Bambury. "I've seen the flames straight away and yeah, the house was in flames within seconds."
The blaze was large enough to damage Mr Bambury's car, which was parked on the other side of the street.
The fire is not being treated as suspicious.
3 News / NZN