Buhari, who took the oath of office on Friday, vowed in his inaugural address to crush the Islamist insurgents whom he described as "mindless" and "godless".
The mosque bombing in the Borno state capital was carried out by an assailant who pretended to be a worshipper joining afternoon prayers, police and witnesses said.
Earlier, the military repelled an overnight attack launched by insurgents who fired rocket-propelled grenades into homes in a bombardment that lasted several hours.
Buhari in his inaugural speech announced plans to reinforce Maiduguri with a new command and control centre to better coordinate the counter-insurgency effort, a move analysts said signalled his commitment to intensifying the fight.
It was not clear if the fresh violence in the strategically crucial city was timed to come the day after the inauguration.
But the new president will likely be tested repeatedly in the coming months by a militant group that has proved resilient over its six-year uprising.
The bomber blew himself inside the Alhaji Haruna mosque next to Maiduguri's Monday Market just after afternoon prayers began at roughly 3:30 pm (1430 GMT), Borno police chief Aderemi Opadokun and witnesses said.
"The roof was blown off and fire destroyed the mats and a few Korans," said a market trader Nura Khalid.
Opadokun said 26 were killed and 28 others injured, describing the assailant as a suicide bomber with an improvised explosive device strapped to his body.
While there was no immediate claim of responsibility, the Monday Market has over the past year been hit by several suicide bombings blamed on Boko Haram.
Shortly after midnight (2300 GMT Friday), residents in the Dala suburb south of Maiduguri woke to the sound of RPGs being fired in succession as Boko Haram fighters tried to advance towards the city, witnesses said.
"It was a nightmare," said a Dala resident Malam Yusuf. He said his own home was hit and his wife's foot was "blown off".
"RPGs kept flying and falling on homes," he said.
Maiduguri-based vigilante Babagana Bulunkutu said several houses were destroyed as Islamist gunmen fired indiscriminately in Dala and two neighbouring suburbs.
A reporter who lives in the area said he heard what sounded like armoured personnel carriers deploying to the southern edge of the city to face the rebel advance.
Three senior security sources in Maiduguri who were not authorised to speak publicly said the attack had been repelled.
"All is under control. There is no cause for alarm," said one of those sources.
A death toll for the overnight attack was not immediately available, but residents reported corpses being taken from homes.
The Islamist rebels have been flushed out of several Borno state towns they controlled in an offensive launched in February by Nigeria with backing from neighbouring Cameroon, Chad and Niger.
But there are signs of the militants regrouping, particularly in the remote parts of eastern Borno near the Cameroon border.
Buhari in his inaugural speech noted the successes of the four-nation offensive but said Boko Haram would not be defeated until operational command was shifted from the capital Abuja to Maiduguri.
"This denotes a more hands-on approach to the fight against Boko Haram," said Yan St-Pierre, head of the Modern Security Consulting Group, describing the move as "very sound."
Buhari's predecessor, Goodluck Jonathan, was heavily criticised for his performance against the militants, with the conflict killing more than 15,000 people since 2009 and forcing another 1.5 million from their homes.
Buhari indicated the uprising could have been contained in the early stages but flourished due largely to "official bungling, negligence (and) complacency."
Victims of the conflict, especially in the northeast, voted overwhelmingly for Buhari in March polls, in part because the ex-army general is seen as a strong commander-in-chief.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ