The British leader left the State House about 40 minutes later after meeting behind closed-doors with President Buhari.
The President applauded the British support to the country on anti-corruption campaign.
Britain will use its global aid budget to boost its own interests while also seeking to deepen trade ties with Africa, Prime Minister Theresa May said on Tuesday, countering critics who say aid funds would be better spent at home.
"They understand fully well the U.K.'s predicament and they have a multitude of other trade partners, including China, India and Russian Federation, wanting to invest on a massive scale".
During her trip to Africa, May has tried to downplay fears of the economic damage Brexit might cause the U.K. On Tuesday morning, May told reporters a no-deal Brexit is better than a bad deal, and no deal "wouldn't be the end of the world".
"I don't think it could be safely assumed on anyone's side that the financial settlement that has been agreed as part of the withdrawal bill would then just be paid, in precisely the same shape or speed or rate, if there was no deal", he said.
His comments follow Theresa May's repeated claims that no agreement with the European Union "would not be a walk in the park" but "wouldn't be the end of the world".
Mrs May said she would discuss South African land reform with the country's president Cyril Ramaphosa, backing his calls of having "no smash and grab" change.
This morning she played down warnings made last week by Philip Hammond about the dangers posed by a no-deal Brexit.
He also welcomed UK's support at strengthening democratic institutions in the country.
Britain's Brexit minister Dominic Raab told lawmakers on Wednesday he was confident that a deal was "within our sights", although he added that there was "some measure of leeway" on the October timetable.
Defence Secretary Gavin Williamson said: 'The danger space poses as a new front for warfare is one of my personal priorities, and it is absolutely right that we waste no time in going it alone if we need an independent satellite system to combat those emerging threats.
Stressing the historic ties between France and the UK, Mr Lidington said the countries must also pull together "because the foundations of the world order that we forged in the aftermath of war are creaking".
North West University business school economist Professor Raymond Parsons said the United Kingdom was now keen to diversify its economy further and this offers potential economic advantages to South Africa.
The party added: "This is particularly as we have been made aware of plans by the Federal Government to use the visit to dish out more lies to the global community in an effort to cover its failures in governance in the last three years, for which Nigerians are clamouring for a new president under the PDP".