In a decision announced early on Tuesday, a military tribunal in Abuja found 12 soldiers of the 7th Division guilty and five others innocent. All the accused denied the charges. The executions will be carried out by firing squad.
The revolt happened on May 13 after soldiers were ordered to drive at night a road frequently attacked by Boko Haram. The soldiers initially refused, saying it was a suicide mission. They eventually followed orders, and were ambushed.
The convoy was driving from Chibok, the northeastern town from which more than 270 girls and women were abducted from a school a month earlier, Al Jazeera reported.
The bodies of the dead were brought to northeastern city of Maiduguri, leading to a demand by colleagues to speak to the 7th Division's commanding officer, Amadu Mohammed.
They threw stones and shot at him, witnesses said. The officer took refuge in an armoured vehicle and was unharmed.
Brigadier general Chukwuemeka Okonkwo, the court martial president, said the sentences were subject to confirmation by Nigeria's military authorities but said there was no doubt about the gravity of the offence.
The panel considered "its likely effect on the counter-insurgency operations in the northeast as well as its implications on national security", he told the court.
Nigeria's army has been under pressure to end the bloody five-year rebellion that has claimed thousands of lives, made tens of thousands of others homeless and seen the militants make territorial gains in the northeast in recent weeks.