The flames broke out along 129th Street in the Kew Gardens sections on Monday morning.
More than 150 firefighters responded, fighting the four-alarm fire for hours.
Some of them climbed into windows to help rescue residents.
Many were trapped by heavy smoke, including a little girl who suffered minor injuries.
Some tenants who were at work when the fire broke out were shocked when they returned to find their homes destroyed.
The Red Cross is helping the victims.
The cause of the fire remains under investigation.