The 72-year-old general, who first came to power three decades ago via a military coup and campaigned as a born-again democrat, also promised to tackle graft in Africa’s largest economy.
“Boko Haram will soon know the strength of our collective will. We should spare no effort,” Buhari said in his first formal speech since winning the election. “In tackling the insurgency, we have a tough and urgent job to do.”
The group has killed thousands in its push to carve out a caliphate in northeastern Nigeria.
Despite the killing of more than a dozen voters by Boko Haram gunmen – who had pledged to derail the poll – the election was one of the most orderly in Nigeria’s history.
Buhari won the election with 15.4 million votes to outgoing president Goodluck Jonathan’s 13.3 million, a margin wide enough to prevent any challenge.
In an unprecedented step, Jonathan phoned Buhari to concede defeat and urged his supporters to accept the result, a signal of deepening democracy that few had expected in Africa’s most populous nation.
Buhari congratulated Jonathan for peacefully relinquishing power on Wednesday.
“President Jonathan was a worthy opponent and I extend the hand of fellowship to him,” Buhari, wearing a black cap and kaftan, told reporters and supporters to loud applause.
“We have proven to the world that we are people who have embraced democracy. We have put one-party state behind us.”
The rules state that Jonathan must officially hand over on May 29.
His People’s Democratic Party (PDP) has been in charge since the end of army rule in 1999 but had been losing support due to oil sector corruption scandals and the government’s lack of success in combating Boko Haram.
“President Jonathan has placed his country’s interests first by conceding the election,” U.S. President Barack Obama said.
Nigeria’s main stock index soared 8.3 percent, posting its single biggest gain this year, and Nigerian dollar-denominated bonds climbed too on relief at the absence of the violence and fraud that has blighted previous elections.
“The context has changed … There have been 16 years of democracy, there’s a constitution, there are legal safeguards,” British High Commissioner Andrew Pocock told BBC radio.
Investors are also cautiously optimistic that any crackdown on corruption by Buhari will stimulate investment and boost flagging growth in the oil-dominated economy.
Cities in the largely Muslim north, where Buhari’s core support base lies, erupted in celebration.
Jonathan’s appeal to his supporters that “nobody’s political ambition is worth blood” meanwhile helped calm their frustrations, reducing the chance of post-election violence that blighted the 2011 poll when Buhari lost to Jonathan.
Buhari took power in a 1983 coup only to be thrown out 18 months later by another general. He subsequently embraced democracy, running in several elections and despite losing always bouncing back.
“I ask that we all be circumspect, respectful and peaceful … We must begin to heal the wounds,” he said.
Nigeria remains a complex ethnic mix of 170 million people, split between Muslims and Christians, with more than 500 languages. Though they mostly live side by side in peace, many harbor disputes that politicians have often used to stoke violence that has worsened over the years.
Buhari must also deal with the fallout from a dive in global oil prices in the last eight months which has hammered state revenues and forced two de facto currency devaluations.
“He’s a man with a strong sense of mission and he has clear ideas about what he wants to do with Nigeria, on corruption, on restoring national discipline,” Pocock said.
But analysts say cracking down on graft in a country where it is so endemic could take decades.