The group, using the name Islamic State West Africa Province (ISWAP), said in a statement posted on social media that the bomber "was able to detonate his explosive vest in the area of Maiduguri".
It claimed "at least 15 apostates (non-believers)" were killed in the attack, which happened at about 12:00 pm (1100 GMT) at the Borno State Secretariat in the city.
But Nigerian Army spokesman Sani Usman said only two died and said the attacker blew up as security personnel stopped him from trying to get into the government offices.
"Sadly, the injured policeman died later," Usman said in an emailed statement, adding that 18 people were injured and taken for treatment.
More From This Section
Mohammed Kanar, regional coordinator for the National Emergency Management Agency, and an accident and emergency spokesman for the Borno State Specialist Hospital, also confirmed just two deaths.
Between 19 and 24 people were injured in the blast, they added.
Locals and street vendors earlier told AFP the explosion initially appeared to come from a passing motorised rickshaw, which went up in flames and was gutted in the blast.
The Islamist group was founded in Maiduguri in 2002 and the city has been repeatedly attacked since the insurgency turned violent in 2009.
But a relative calm has returned there in recent months as a military counter-insurgency makes apparent gains against rebel strongholds across the northeast.
Nigeria's President Muhammadu Buhari is this weekend hosting leaders of neighbouring countries, plus French President Francois Hollande, and senior British and US government officials.
The meeting is expected to focus on boosting regional and international cooperation in defeating the Islamic State group affiliate, which has also attacked Cameroon, Chad and Niger.