The Islamic militant group also took over a major highway in the Borno state capital Maiduguri near the site of the village attack.
Shahidullah Shahid, a former Taliban member, is the third ISIS commander to be killed in Afghanistan this year.
The country's defense ministry said the suspect was arrested at a checkpoint in the city of Gombe, close to Boko Haram's stronghold in the northeast.
Nigeria's President Muhammadu Buhari on Wednesday held his first meeting with campaigners calling for the release of more than 200 schoolgirls abducted by Boko Haram militants in the northeastern town of Chibok last year.
In June, Nigerian lawmakers called for a bailout to cover unpaid government salaries of hundreds of thousands of workers.
Among the freed Boko Haram suspects were nursing mothers who were arrested while pregnant and delivered their babies in detention.
Allegations that Nigeria's Deputy Senate President Ike Ekweremadu illegally amended the Senate rules has pitted the nation's two main political parties against each other.
Boko Haram has not claimed responsibility for the attack but it bore the hallmarks of the Islamist militant group, which has killed more than 200 in the past week.
A decade ago, four British Muslims detonated homemade bombs on three underground trains and a bus in London.
The issue arose last week when the @Zahra_Buhari account used profanity in describing Gambia President Yahya Jammeh.
Nobody has claimed responsibility for the attacks, but the target and method was consistent with previous attacks by Boko Haram.
A suicide bomber killed six people at a church in northeast Nigeria earlier on Sunday at the end of a week in which suspected Boko Haram insurgents killed more than 200 people.
Nigerian President Muhammadu Buhari is expected to meet U.S. President Barack Obama July 20, when the Boko Haram issue is likely to be high on the agenda.
Earlier this year, Boko Haram occupied large parts of northeastern Nigeria and was increasingly mounting attacks on neighboring states, prompting the regional leaders into action.
Within ISIS's shadowy military structure is an elite special forces division. It has two priorities: to export the caliphate and defend it anywhere in the world.
Residents of a southeast Nigerian city are protesting government plans to relocate up to 50 captured Boko Haram members.
Her appointment came after a historic and largely successful election cycle, which was lauded by leaders around the world.
Five key takeaways from Florida Gov. Jeb Bush's release of three decades of tax returns as he runs for president.
It stole nearly half of what it earned in the past three years while under the watch of former President Goodluck Jonathan, officials revealed.
Many of the foreigners still living in the Chatsworth displacement camp were unwilling or unable to return to their home countries or to their South African communities.
As Nigeria continues to foster economic relations with China, Nigerian students say learning Chinese puts them in a better position for job opportunities.
The chairman of the Nigeria's Christian Association said same-sex marriage was evil and should remain illegal.