He had been travelling from Johannesburg on 18 June with another man who fell from the aircraft and was found dead on a roof in Richmond.
The man was discharged from hospital in early August, the Home Office said.
His condition continues to be "closely monitored", it said.
A spokesperson for the Home Office said: "He has been transferred to Harmondsworth Immigration Centre while his identity and nationality are fully investigated."
The two stowaways came to the attention of the media when one, aged 24, fell during the 5,700 mile journey (9,000km) and was found on the roof of an online retailer's headquarters in Kew Road.
A post-mortem examination found he had died from multiple injuries.
There have been other cases in which stowaways have fallen to their deaths in London after smuggling themselves on to planes and hiding in landing gear.
In September 2012, Jose Matada, 26, was found dead after falling from the undercarriage of a flight from Angola to Heathrow on to a street in Mortlake, west London.
An inquest heard he may have survived freezing temperatures of up to minus 60C (-76F) for most of the 12-hour flight but it was believed he was "dead or nearly dead" by the time he hit the ground.
A stowaway has made a "significant recovery" after clinging to the underside of a Heathrow-bound plane from South Africa for 11 hours, according to the Home Office.