The blaze broke out just after 7 a.m. at 535 West 160th Street off Amsterdam Avenue.
The fire started on the fifth floor of the five-story apartment building and went to two alarms.
Some of the building's residents climbed onto the roof to escape the flames.
Firefighters were able to get the blaze under control after about an hour.
Several firefighters were treated for minor injuries. Three civilians were also hurt. Two were treated at the scene, while a third was taken to Columbia Presbyterian Hospital with non-life threatening injuries.
Investigators are looking into the cause of the fire.