Shettima had returned to Borno state's capital Maiduguri, the French news agency AFP said, although fears remained for numerous abducted supporters.
Amaq, Islamic State's communications channel, claimed a Boko Haram breakaway faction had killed 42 people during Tuesday's attack near the town of Dikwa, inside Nigeria's northeastern border with Cameroon.
However, government sources on Wednesday put the ambush toll at between four and ten killed, including two soldiers.
Also unhurt, according to Reuters, was Babagana Umaru, the governorship candidate in Borno for Nigeria's ruling All Progressives Congress (ACP) party, who was traveling with Shettima.
Read more: Election showdown on Saturday
The incumbent governor — at the end of a maximum two four-year terms — was campaigning for a seat in Nigeria's Senate in Nigeria's elections due to take place on Saturday. Muslim-majority northeast Nigeria, including Borno, is an APC stronghold.
Gunmen on motorcyclesSecurity sources said gunmen on motorcycles opened fire on the tail end of the motorcade as Shettima and Umaru were nearing Gamboru.
"There was heavy fighting between the attackers and the soldiers and CJTF," a Nigerian Civilian Joint Task Force member told AFP on condition of anonymity.
Party supporters were kidnapped and taken into the bush after their bus became stuck in sand while trying to "turn back towards Dikwa," the source said.
"We still don't know the fate of several of our supporters who were abducted during the fight," said Ngari Kalla, an APC campaigner.
"There vehicle was stuck and before they could get out the gunmen surrounded them and took them away. This is a major concern to us," Kalla said.
Epicenter, kidnappings, raidsOver the past decade, Borno state has been the epicenter of conflict, including fatal abductions, that has claimed more than 27,000 lives and left some 1.8 million people homeless.
Last year, governorship candidate Umara espoused a controversial policy of returning tens of thousands of displaced people from makeshift camps in Maiduguri. Aid agencies warned that basic services were still lacking in many towns outside the state capital.
In recent months, Nigeria's military has faced intensified attacks from the self-styled Islamic State West Africa Province of Boko Haram — a faction that split from Boko Haram's long-time leader Abubakar Shekau over his targeting of civilians.
In late December, the IS-affiliated faction known by its acronym ISWAP briefly took over the town of Baga, near Lake Chad; routed a multinational unit of 500 soldiers from Nigeria, Niger, Chad and Cameroon; and seized weapons and vehicles.
ipj/rc (AFP, Reuters)