Africa's cities to triple in size
In five years Lagos in Nigeria is set to overtake the Egyptian capital Cairo as Africa's biggest city.
UN-Habitat's Joan Clos said Africa needed to invest urgently in housing.
He told the BBC that sub-Saharan Africa could learn from North Africa as Egypt, Libya, Morocco and Tunisia had almost halved slum areas in the past 20 years.
Some 199.5 million people in sub-Saharan Africa live in slums, the highest number in the world, the UN said earlier this year.
According to UN-Habitat's State of African Cities 2010 report, urbanisation is happening faster in Africa than anywhere else in the world.
By 2030 the continent will no longer be predominately rural, it says.
Mr Clos, UN-Habitat's executive director, said that cities were attractive places for those wanting to relocate.
"People are looking for a better future and they think the city can offer that," he told the BBC's Focus on Africa programme.
Agricultural reform and poverty in rural areas were another reason for the trend, he said.
See www.bbc.co.uk for full version.