ISWAP leader Abu Musab Al-Barnawi said that Shekau killed himself instantly by detonating an explosive.
The toll could rise as villagers fled into the bush during the attack and some people are still unaccounted for.
The foiled abduction comes less than two days after the release of 344 schoolboys who were kidnapped in the same area on Dec. 11. The incidents have highlighted the insecurity in northern Nigeria.
On Tuesday the jihadist organization claimed responsibility for last week's attack on the Kankara Government Science Secondary School and the kidnappings of hundreds of its students.
17-year-old Usama Aminu told AP about the attack on the school in Nigeria’s northern Katsina State in which men armed with AK-47 rifles abducted more than 300 students from the boys’ school.
More than 100 gunmen on motorcycles stormed the rural school north of Kankara town, forcing students to flee and hide in the surrounding bush.
The grim search for bodies continues after gunmen on motorbikes attacked the area outside Borno state's capital Maiduguri on Saturday.
An anti-jihadist militia said that the assailants tied up the agricultural workers and slit their throats in the village of Koshobe.
Nigeria's military says at least 15 gunmen believed to be Boko Haram Islamic extremists have been shot dead during a battle with soldiers.
"We are safe. We have not been flushed out of anywhere," Boko Haram's elusive leader Abubakar Shekau spoke in a video.
Nigeria is unlikely to see an end soon to the deadly suicide bombings and assaults on remote military outposts carried out by the Islamic extremist group.