Seven adults and five children were picked up in Raubling, Germany after being spotted clinging onto the train from Valencia to Munich.
They are believed to have come from the Ivory Coast, Nigeria and Somalia.
The train travels at speeds of up to 93mph and is extremely dangerous.
In the video, one man can be seen emerging from the undercarriage clearly in pain and walking with a pronounced limp.
He is helped by staff and carried out of the station while shivering and grimacing.
The rescuers worried that many of the travellers were suffering from hypothermia.
The migrants were given towels and blankets and treated at the scene by the German authorities.