Firefighters arrived just after 2 a.m. Friday to heavy smoke and flames coming from a three-story apartment building at 8th and Salter streets.
Officials said neighbors told them people were initially hanging from windows upstairs just after the fire broke out.
First responders desperately tried to revive the victims while performing CPR on the sidewalk.
A 25-year-old man and a 30-year-old man were pronounced dead at the hospital.
A 40-year-old man in critical condition.
Officials said the firefighters on the scene are taking the tragedy hard.
"Our firefighters are struggling right now. They did a wonderful job on scene, but they're also part of the community that they serve too," said Deputy Fire Commissioner Gustav Baumann.
South Philadelphia residents on the block said they warned the city about dangerous conditions at the house, fearing someone inside would get hurt.
"Either no one was choosing to do anything with the city, or their hands were tied based off whatever the laws were," said Larry Herring.
A spokesperson for Licenses and Inspections said it is an ongoing investigation, and inspectors were on the scene overnight.
Investigators from the fire marshal's office will work to determine the cause.
No working smoke detectors were found inside the home.