He was nevertheless defeated in the city by Mr Obi, a relative newcomer who mobilised the support of many young people, especially in urban areas, shaking up the country’s two-party system.
Mr Tinubu won most other states in his home region of the south-west, where he is known as a “political godfather”.
He campaigned for the presidency under the slogan: “It’s my turn”.
President Muhammadu Buhari is stepping down after two terms in office, marked by economic stagnation and growing insecurity around the country – from an Islamist insurgency in the north-east to a nationwide crisis of kidnapping for ransom and separatist attacks in the south-east.
Mr Tinubu now has the task of solving these problems, among others, in Africa’s most populous nation and biggest oil exporter.
After fighting military rule in Nigeria, escaping into exile and being one of the founding members of the country’s democracy in 1999, Mr Tinubu will feel that he was destined to become president.
He was always the favourite to replace Mr Buhari – whom he helped become president – and the hurdles he has surmounted to get here will make this an even sweeter win for him.
He was not expected to win the party primary, yet he won.
Many said his decision to go with another Muslim as a running mate would prove an obstacle, but it was not.
Previously all major parties have split their presidential tickets with a Christian from the south and a northern Muslim in order to achieve broad support across this vast nation of 210 million people.
He will now have to prove that he can hit the ground running and that he is still the same formidable force who built modern Lagos, Nigeria’s commercial hub.
Mr Tinubu will be taking charge of a crumbling economy, widespread insecurity and as the results map shows, a country retreating into regional and religious blocs.