The 76-year old leader, in power since 2015 and re-elected in February, took the oath of office for a second four-year term in the capital Abuja, Presstv Reported.
"I do solemnly swear that I will be faithful and bear true allegiance to the Federal Republic of Nigeria," Buhari said, dressed in simple white robes and traditional embroidered cap. "I will preserve, protect and defend the constitution."
Buhari took the oath of office at what officials called a "low-key" ceremony.
It included a red-carpet arrival flanked by bagpipers with a military guard of honor and seating packed with dignitaries.
Vice President Yemi Osinbajo was also sworn into office.
Buhari was re-elected with 56 percent of the vote in Africa's most-populous nation -- and top oil producer -- after a delayed poll that angered voters.
His rival, Atiku Abubakar of the Peoples Democratic Party (PDP), who came second with 41 percent of the vote, has along with other opposition leaders launched an ongoing legal challenge to the victory.
They allege irregularities in the vote and have called it a "sham" result.
Buhari, a former army general who led a tough military government in the 1980s, campaigned on a promise to make the country safer.
He begins a final term beset with numerous challenges.
Nigeria is struggling from multiple conflicts, including an extremist insurgency in the northeast of the country.
On Tuesday night, a large force of the Boko Haram extremists attacked the northeastern city of Maidugari, but soldiers stopped them before they could enter, resulting in a night-long battle, according to security sources.
The militants fled just before dawn on Wednesday, they said.
Buhari's time in power has also been dogged by questions about his medical fitness. He has spent several months abroad for treatment for an unspecified condition.
Buhari has touted himself as a "converted democrat" to persuade those with misgivings that his military past was history.
But in office he has struggled to shake off claims of authoritarianism -- particularly in his fight against corruption which critics say has been one-sided against perceived political opponents.
Buhari, who inspected the military parade in front of applauding spectators after watching the flag of Nigeria raised to the national anthem, made no speech.
But ahead of the inauguration he told state television in an interview of what he hoped to achieve next -- speaking how he wanted those stealing money from government to be "punished."
The economy has suffered difficult times in recent years.
"My frustration is that we cannot move faster in prosecution and punishment of corrupt persons," Buhari said late Monday.
"Even if you are using whistle blowers, you have to go to the police... to go through the rigmarole of full investigation before prosecution," he added.
His last term was held up by squabbles with lawmakers in the National Assembly, who, among other things, blocked the passing of last year's budget for several months.
He passed an ambitious budget for 2019 on Monday, although analysts criticized that as "unrealistic," saying figures were based on an over-estimation of available income amid volatile global crude prices.