Four work colleagues from a metalworking factory were apparently racing two cars along the B 311 motorway between Tuttlingen and Immendingen around 11 pm on Wednesday, according to regional daily Südkurier.
One man alone in a car tried to overtake the three men in another vehicle in a a no-passing zone around a left-hand curve.
Both cars were driving side-by-side at high speed when they crashed into an oncoming tractor-trailer truck without braking, police said. The impact resulted in several other collisions between the two cars, the truck and a second truck that had been following.
The car holding the three men was torn apart, police said.
Two men were killed instantly. The third passenger was pulled from the wreckage alive but died soon after at the scene.
The man who had been attempting to pass the other car was hospitalised with severe injuries.
Both truck drivers survived uninjured, but their vehicles suffered heavy damage.