The factory was tucked inside a fertilizer company in Buni Yadi town in Yobe state, according to officials.
Islamist fighters took over the town in August, one of many seized in the troubled northeast. Troops have battled the militants for months to regain control, and said they recaptured it last week.
Militants planted explosive devices along the highway on their way out, which delayed the soldiers’ advance. Four soldiers were killed during the operation.
Soldiers have been scouring the factory and have found suicide bomber vests and improvised explosive devices, the military said Friday.
“Troops are still evacuating the materials … a large quantity of improvised explosive devices, including those commonly used by suicide bombers, were recovered from the site,” the military said in a statement.
ISIS welcomes Boko Haram
The discovery comes days after ISIS purportedly said it welcomed Boko Haram after the latter pledged allegiance to it.
In an audio message purportedly from an ISIS spokesman, the group announced that it had accepted a pledge of allegiance from Boko Haram.
ISIS supporters posted the audio online. CNN cannot independently verify the 28-minute message.
The message says that ISIS, which calls itself the Islamic State, has expanded to western Africa and congratulated “our jihadi brothers” there.
An ISIS spokesman encouraged people to join fighters in Africa if they cannot make it to Iraq or Syria.
Boko Haram’s leader, Abubakar Shekau, announced in an audio message last week that his terror group wanted to join ISIS.
Years of terror
Boko Haram has terrorized northern Nigeria regularly since 2009, attacking police, schools, churches, mosques and civilians. It has also kidnapped students, including more than 200 schoolgirls who were abducted in April and remain missing.
The Islamist group has said its aim is to impose a stricter form of Sharia law across Nigeria.