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.
"The new administration will intensify its efforts in security, restructuring the economy and fighting corruption," Mr Buhari said after his victory was officially announced.
Read MORE
BBC NEWS