The car hit a wall before overturning in Brickyard Road, Aldridge, in the West Midlands, at about 02:15 GMT.
It ended up on its roof with the engine landing a few feet away.
One man cut his head and another had back and neck pain and were taken to hospital. The two other passengers were uninjured and discharged at the scene.
All the men were aged in their 20s, West Midlands Ambulance said.
The two men who needed treatment were taken to Walsall Manor Hospital.
Four men had a lucky escape after suffering relatively minor injuries when their car overturned, ripping the engine out of the vehicle.