Scores of fighters attacked the base in Damasak, in the far north of Borno state, on Wednesday evening, firing heavy artillery in an apparent bid to overrun it.
Hours of fighting ensued but the attack was repelled with the help of aerial support, military sources in the Borno state capital, Maiduguri, told AFP on Thursday morning.
Nigerian Army spokesman Brigadier General Texas Chukwu confirmed troops from 145 battalions were fighting the jihadists, calling the battle "fierce".
"The troops are dealing with the terrorists," he said on Wednesday evening.
Chukwu's statement was a departure from the military's repeated denials of Boko Haram attacks in recent weeks, which have seen dozens of troops killed and weapons stolen.
Last month, 48 soldiers were killed in a raid in the village of Zari, near Damasak, while last Friday, a base was sacked in the town of Gudumbali.
Gudumbali is 80 kilometres (50 miles) from Damasak.
Thousands of civilians were forced to flee and Boko Haram temporarily seized the town before withdrawing the next day.
On Saturday, a regional fighting force set up to stop cross-border attacks helped to repel another attack on a base near Baga, on the shores of Lake Chad.
A senior military officer, who asked to remain anonymous because he is not authorised to speak to the media, said the jihadists in Wednesday's attack were heavily armed.
"The terrorists attacked the base around 6:00 pm (1700 GMT) but they met stiff resistance from troops who engaged them in hours-long battle," he added.
After about four hours of fighting the militants were "beaten" and forced to withdraw after a fighter jet bombarded their positions, he said.
There was no immediate indication of casualties on either side.
The latest attacks have been blamed on the Islamic State West Africa Province (ISWAP), a Boko Haram splinter group headed by Mus'ab al-Barnawi and backed by IS.
Security analysts assess that the Barnawi faction currently poses a greater threat than that led by Abubakar Shekau, who has indiscriminately targeted civilians.
President Muhammadu Buhari was elected in 2015 on a promise to defeat Boko Haram, whose insurgency has killed more than 27,000 people in northeast Nigeria since 2009.
The former army general has repeatedly claimed the jihadists are weakened to the point of defeat, despite the continued attacks.