Islamic State West Africa Province (ISWAP) fighters fired a rocket-propelled grenade (RPG) on the convoy of Asheikh Mamman Gadai, the political administrator of Nganzai district, while he was returning from the garrison town of Monguno on Wednesday, they said.
"The RPG hit one of the vehicles in the convoy which exploded and killed the security men in it," militia leader Umar Ari told AFP.
"The personnel included three policemen and a CJTF (militia)," he said.
The ambush happened at Mile 40, a village along the 135-kilometre (84-mile) Maiduguri-Monguno highway, said militia member Ibrahim Liman, who gave the same toll.
Both sources said the local official was unhurt in the attack.
ISWAP has intensified attacks on travellers along the highway where they set up checkpoints, robbing and killing motorists as well as ambushing security patrol convoys.
The near daily attacks prompted military patrols along the highway, but violence continues.
The 13-year-old jihadist insurgency has killed more than 40,000 people and displaced 2.2 million in northeast Nigeria.
The violence has spilled into neighboring Niger, Chad and Cameroon, prompting a regional military coalition to fight the insurgents.