Dozens of Islamist militants on motorcycles and two motorised rickshaws stormed into Dalori camp on Thursday, shooting people and looting food supplies after overrunning a nearby military base.
"We have recovered two dead bodies from the attack which also left several IDPs (internally displaced persons) with injuries," said Bello Danbatta, head of security in the State Emergency Management Agency (SEMA).
"The insurgents looted and burnt shops in the camp and also carted food supplies from the main store where food aid is stored," he said.
Dalori, about 15 kilometres (nine miles) from regional capital Maiduguri, houses about 50,000 people in makeshift dwellings.
The militants attacked the camp after pushing out soldiers at a nearby military base in a shootout, several displaced people said.
"They (Boko Haram) chased the soldiers away and burnt the base before forcing their way into the camp, shouting 'Allahu Akbar' (God is Great)," said camp resident Aisa Kyarimi.
"They started shooting and we all fled the camp," said the mother of three.
Hassan Modu, a civilian militia member guarding the camp, said he ran into the attackers as he tried to flee.
"They were no doubt after looting food," he said.
Dalori camp and the neighbouring village have been repeatedly targeted in Boko Haram attacks by heavily armed fighters and female suicide bombers.
In January 2016, at least 85 people were killed when militant fighters stormed and torched Dalori village and tried to gain access to the camps.
Despite the government's insistence that Boko Haram militants are near defeat, attacks on civilians and troops persist almost a decade after the insurgency started.
The conflict has claimed more than 27,000 lives since 2009 and left some two million people displaced.
The militants have splintered and a faction affiliated to the Islamic State group is waging its own campaign of violence mainly targeting the military.