Abdullahi Sheikh Abas, 31, was picked by an electoral college to be a federal MP.
He was up for election against Information Minister Mohammed Abdi Hassan.
Somalia has been holding indirect elections since October to renew its parliament as the country remains too dangerous for a national vote.
Much of the country is still under the control of Islamist militant group al-Shabab, which is affiliated to al-Qaeda.
Mr Abas grew up and was educated in Dadaab, the world’s biggest refugee camp, in north-eastern Kenya.
In Somalia’s long electoral process, 135 traditional clan elders selected some 14,000 delegates, who formed 275 electoral colleges.
From 23 October to 10 November, each electoral college voted for an MP to sit in the lower house of parliament.
The results are now being published and Mr Abas has been elected as federal MP for Kismayo in Somalia’s Jubaland region.
It is not clear how Mr Abas sold himself to the electoral college, but BBC Somali analyst Mohammed Abdinoor says Somalis who stayed at home have strong sympathy for returnees like Mr Abas, who grew up in refugee camps.
The newly elected MPs are due to choose a president by the end of November.