Police attempted to arrest the man at the U6 Thaliastrasse underground station at around 5pm on Tuesday.
Witnesses saw him and several other men selling drugs and called the police.
When officers arrived the 18-year-old ran onto the station platform and jumped onto the tracks in an attempt to get away – but was hit by an incoming U-Bahn train.
Despite his severe injuries he got up and ran across to the opposite tracks where he was almost hit by a second train, however the driver managed to hit the emergency brakes in time and avoided a collision.
The injured man climbed back onto the platform and was arrested by waiting police officers. He was taken to hospital with a suspected skull fracture.
The U6 was closed for a short time on Tuesday evening.