The blaze broke out on the first floor of an apartment building on 88th Street and York Avenue just after 5:30 a.m.
Authorities say the flames quickly spread through the walls all the way up to the fifth floor.
Firefighters could be seen on the roof, where smoke was billowing.
Officials say no injuries were immediately reported, and it wasn't clear if the building was fully evacuated.
York Avenue was restricted to one lane in each direction, and 88th Street was closed while firefighters battled the flames.
Three firefighters and two residents were hurt.
One of the firefighters was listed in serious condition at New York Presbyterian Hospital. The other four people sustained minor injuries.
The cause of the fire is under investigation.
Get Eyewitness News Delivered