The men were attacked during raids on three homes overnight, he said in an account confirmed by a local reporter.
However, the military told the BBC only three people had been killed.
At least 23 others have been killed in separate attacks in the north this week blamed on militants wanting to impose Islamic law on Nigeria.
The insurgency was launched by Boko Haram in Maiduguri in 2009, but a second militant group, Ansaru, emerged last year.
Last month, suspected militants slit the throats of at least 15 Christians near Maiduguri.
In the latest attack, the assailants first beheaded a father and son at their home, before beheading two other men at their residence and a fifth person at another house in Maiduguri, said a resident, who spoke to the BBC Hausa service on condition of anonymity.
It is unclear who carried out the attacks or what their motives were, but there are strong suspicions that Boko Haram was involved, the resident said.
Hunters killed Continue reading the main story “ Start Quote
Two gunmen lost their lives and a soldier was wounded during an exchange of fire”
Lt-Col Sagir Musa Army spokesman A Maiduguri-based journalist confirmed the resident's account to the BBC.
But army spokesman Lt-Col Sagir Musa said suspected gunmen killed three people during the attack.
The joint task force - made up of soldiers and policemen - rushed to the scene when it was alerted, he said.
"It cordoned off the area, arrested three suspects and recovered one assault rifle with ten rounds of ammunition," Lt-Col Musa said.
On Monday, gunmen apparently targeted hunters selling bush meat in Damboa in north-east Nigeria, killing 18 people, witnesses said.
Another five people died on Tuesday when a group of men playing draughts was attacked in Kano.
No group has said it is responsible for the attacks.
Strict Muslims believe it is forbidden to eat animals such as monkeys or to play games that could influence people to take up gambling.
These attacks followed an attempt on the life of the second most important Muslim leader in Nigeria, the Emir of Kano, whose convoy came under fire on Sunday. He survived but several of his guards were killed
Boko Haram has been blamed for the deaths of some 1,400 people in central and northern Nigeria since 2010.
Last year alone, the group was linked to more than 600 deaths.
Ansaru announced its existence last June.
In December, it said it had kidnapped French national Francis Colump in the northern Katsina state.