The bomber, who tried to gain access to the hospital, detonated his explosives outside the building at around 5:30 pm (1630 GMT) today.
"Five people were killed and 10 others injured near the Molai leprosy hospital when a male bomber blew himself up," said Mohammed Kanar, regional coordinator for the National Emergency Management Agency.
"The bomber had wanted to get entry into the hospital but was contemplating how to pass through security checks at the gate when the bomb went off."
Local resident Ibrahim Bulama said the bomber was one of three men who were dropped off near the hospital by a SUV vehicle.
"They looked around for a while, obviously trying to sneak into the hospital," Bulama said, adding that the facility was being guarded by civilian vigilantes who are assisting the military in the fight against Boko Haram Islamist insurgents.
"Suddenly, the explosives on one of them went off. The other two fled in the confusion. Five people were killed and 10 others injured."
Boko Haram, which has been fighting to establish a hardline Islamic state in northeast Nigeria since 2009, has intensified its campaign of violence in the last month.
Danlami Ajaokuta, a civilian vigilante fighting Boko Haram, confirmed the hospital explosion and added that there had been a failed suicide attack by two women in Jakarna village, about 40 kilometres from Maiduguri yesterday afternoon.
"Two female suicide bombers died when the explosives on one of them went off prematurely while they were waiting for a bus along the highway in Jakarna," Ajaokuta said.
"Her explosives were still intact."
Ajaokuta added that bus drivers have been refusing to pick up female passengers on the road outside Maiduguri since March, when three female suicide bombers blew themselves up at a bus stop in the area.
The armies of Nigeria, Chad, Niger and Cameroon have been fighting a joint campaign against Boko Haram for several months, pushing militants out of captured towns and villages.
