A car carrying six people came under attack on the Damboa-Biu road near the remote village of Nwajurko at about 9:30 a.m, the military source said.
The militant group, which has killed thousands of people during its six-year armed campaign to set up an Islamic state in northeastern Nigeria, has carried out several attacks on the Damboa-Biu road in the last two years.
“Four of the passengers were shot dead by Boko Haram while two others who fled the ambush sustained injuries partly from gunshots,” said the military source, who did not want to be named.
Adamu Mamman of the civilian JTF, a grassroots community security group, confirmed the four deaths.
“When we heard of the ambush … we mobilized our men to go to the scene but unfortunately we saw four people already dead,” he said.
Mamman said one of the survivors from the ambush had described how the attackers opened fire on the car when the driver tried to speed off.
Borno is the birthplace of the jihadi Boko Haram sect, which has killed more than 600 people in a series of raids and bombings since President Muhammadu Buhari took office on May 29, vowing to crush the militant group.
At the start of the year Boko Haram controlled territory about the size of Belgium in the northeast, but the army said it had pushed the group from most of that area in the last few months with the help of troops from Chad, Niger and Cameroon.
However, there has been a resurgence in attacks by the militants in recent weeks.