The search for the man began shortly before 6 a.m. Monday at Erie and Whitaker avenues.
Police say the 33-year-old man was sleeping in a dumpster when it was lifted into a waste management truck.
No one has yet said how authorities realized the man was inside the truck.
When police saw he was stuck, they called rescue crews.
Firefighters hauled out ladders. They raked through the trash, digging through the truck.
It took nearly two hours to get the man out of the dumpster.
He was taken to Temple University Hospital with lower abdominal, hip and leg injuries. He is listed in critical condition.
Send a breaking news alert
Report a correction or typo
Learn more about the 6abc apps