The 76-year-old defeated his main rival, former Vice-President Atiku Abubakar, with a margin of nearly four million votes.
Mr Abubakar’s People’s Democratic Party (PDP) has rejected the result. Turnout was a record low at just 35.6%.
Delays and violence marred the run-up to Saturday’s poll but no independent observer has cited electoral fraud.
In an official announcement after his victory, Mr Buhari promised the new administration will intensify its efforts in security, restructuring the economy and fighting corruption – taking that Nigeria is Africa’s leading oil producer but corruption and a failure to invest the proceeds from the industry have hampered development.
One contributing factor behind Mr Buhari’s victory was the higher turnout in the northern states.