Heavy gunfire and rocket-propelled grenades hit a military convoy in Gazagana village, 30 kilometres from Yobe state capital Damaturu on Saturday.
“We lost 13 soldiers in this ambush and several were injured,” an officer said.
The convoy was headed for a military base at Buni Yadi, another 20 kilometres from Damaturu, said the second army source, who gave the same death toll.
“It was a fierce battle and the terrorists also suffered casualties,” he said, without giving a figure.
The ISWAP group carries out regular attacks in Buni Yadi region on soldiers and travellers, with the violence spilling over into Borno state.
Since 2009, the jihadist campaign in northeast Nigeria has focused on Borno where the Boko Haram group is also active.
ISWAP split from Boko Haram in 2016 and rose to become a dominant group.
The violence has spread into neighbouring Niger, Chad and Cameroon, prompting a regional military coalition to fight the militants.
At least 36,000 people have been killed in the conflict, which has displaced about two million from their homes since 2009.