Reports said the heavily armed terrorists tried to attack a military detention facility where their comrades were being held.
Two members of the Civilian Joint Task Force, who spoke to AFP, said the attack was repelled by soldiers and the CJTF.
Ibrahim Liman and Babakura Kolo said an exchange of fire between troops and the terrorists in the Jiddari Polo area of the city began at about 6:00 pm on Thursday,
"From all indications they're trying to reach Giwa Barracks, where many of their comrades are being held," Liman told AFP.
Kolo added: "There has been gunfire and explosions and residents have all fled the area. Troops have intercepted the attackers…
"They (Boko Haram) are making an attempt to infiltrate the city."
The number of Boko Haram fighters involved in the attack was unclear as at the time of filing this report.
Liman, whose vigilante group assists the military with security, said the terrorists were armed with rocket-propelled grenades and "artillery".
The Federal Government has repeatedly claimed that the Boko Haram insurgency has been defeated but the sect continues to carry out attacks in Borno villages.
The sect has killed at least 20,000 people in the northeast since 2009.
The terrorists have severally attacked the Jiddari Polo area, which is on the outskirts of Maiduguri.
In December 2015, 22 people were killed and 91 others injured when the terrorists stormed the area, shooting guns and unleashing a wave of young suicide bombers.
That attack followed President Muhammadu Buhari's statement that the military had "technically" won the war against Boko Haram.
A similar attack in June 2017 also saw the militants try to get to the Giwa Barracks, a military detention facility which houses hundreds of Boko Haram suspects - 11 people were killed.
Boko Haram managed to overrun the facility in March 2014 and freed dozens of their comrades held there.