Banks, shops and houses were also looted and burnt during the six-hour raid by militants armed with rocket-propelled grenades, they added.
Six of the militants were killed in a counter-offensive, the army said.
The Islamist group Boko Haram is waging an insurgency in Nigeria.
Thousands have been killed since the conflict started in 2009.
On Thursday, France's President Francois Hollande pledged support for Nigeria in its fight against Boko Haram.
"Your struggle is our struggle," he said at a security conference in the capital, Abuja.
Witnesses told the BBC Hausa Service that the victims were shot dead, others had their throats slit or were burnt in their homes.
The attacks took place in the town of Michika, which has a population of several hundred thousand, and the villages of Shuwa and Kirchinga.
Nigeria's Senate President David Mark described the assault as an "open declaration of war", the Associated Press news agency reports.
"It is curious that under an emergency rule when security operatives are on red alert, this mayhem still persists," he is quoted as saying.
Residents told the BBC the security forces fled their posts because they were in no position to confront the heavily armed militants, who travelled in a convoy of pick-up trucks.
"Everyone has left the village. We've all run away into the bush," a resident of Shuwa told the BBC.
"We think the military have responded and there were exchanges of fire," he added.
Nearly all the shops in Michika have been looted and destroyed, residents said.
A police station and three banks in the town were also raided, they added.
Boko Haram often targets such buildings to finance and arm its fighters, correspondents say.
It has not commented on the latest attack.
It was blamed for killing at least 29 people in an attack on Monday night on a rural boarding school in Yobe state.
President Jonathan declared a state of emergency in Adamawa, Yobe and Borno states last year in an attempt to curb the insurgency.
His critics say the state of emergency has been ineffective, with Boko Haram stepping up attacks in the region.
Speaking at the security summit, Mr Jonathan called on countries to work together to eliminate "terrorism".
An act of terror against one nation was an act of terror against all nations, he said.
Regional leaders, including those of Niger and Senegal, are attending the summit.
It coincides with celebrations to mark Nigeria's centenary.
The West African state was formed following the amalgamation of the mainly Muslim north and Christian south during British colonial rule in 1914.