One million people are now living rough in Somalia, the UN refugee agency says.
Some 600,000 have left Mogadishu this year
The figure includes 60% of Mogadishu residents who have fled their homes - 200,000 in the past two weeks - leaving many districts empty, says UNHCR.
People have been forced out by renewed conflict between Islamist insurgents and Ethiopian-backed government forces.
Kenya's government has been strongly criticised for deporting 18 failed Somali asylum-seekers. "They are being sent to die," a rights worker said.
Meanwhile, the UN Security Council says it will continue to plan for a peacekeeping mission to Somalia, despite the secretary-general's opposition.
Ban Ki-moon said earlier this month that it was too dangerous to send troops to the war-torn country.
He instead urged countries to help the existing African Union mission.
On Saturday, Islamist insurgents armed with machine guns and grenades attacked the AU base in Mogadishu. Only Uganda has sent troops to the AU force.
'Against the law'
UNHCR says those who have fled to the Afgooye area, 30km from Mogadishu, are living in desperate conditions.
They are using plastic bags and rags to patch up their flimsy mud and straw huts.
UNHCR says landowners are charging them $1.5 a month for a tiny plot of land to erect their shelters.
Uganda has some 1,700 soldiers in Somalia as part of the AU mission
The refugee agency says 600,000 people have fled Mogadishu this year - on top of 400,000 displaced by earlier rounds of fighting.
A Kenyan human rights group has strenuously condemned the deportation of 18 failed asylum-seekers back to Mogadishu.
Alamin Kimanthi, who heads the Muslim Human Rights Forum, said police forced the women and children into a plane destined to Mogadishu, despite their protests.
They are part of a group of 50, whose requests for refugee status were rejected in Uganda.
The other 32 are being held at Nairobi's Jomo Kenyatta airport.
"We condemn the decision to deport these people to Somalia because it is clear that they are just being sent to die," Mr Kimanthi told the BBC News website after visiting the airport.
"It is against the law and we call on the international community to act on this situation."
After discussing Mr Ban's report, the Security Council "underlined the need to continue to actively develop contingency plans for the possible deployment of a peacekeeping force as part of an enhanced UN integrated strategy in Somalia", said its president, Marty Natalegawa from Indonesia.
South Africa's UN ambassador Dumisani Kumalo said the situation in Somalia was "heart-breaking".
"The UN has to find a way to go in there," he said, according to the AP news agency.
"The [UN] Charter says maintain international peace and security everywhere," he said. "It doesn't say except in Somalia."
Somalia has not had an effective government since 1991.
Violence has intensified this year after Ethiopia helped the government oust the Union of Islamic Courts last December.
In Mogadishu, Ethiopian and government troops conducted door-to-door searches for insurgents in the capital over the past week, sparking deadly clashes.
The United Nations says some 170,000 people fled the violence last week and hundreds of others have been injured in the crossfire.