The central criminal court in Baghdad handed 24 of 28 defendants the maximum sentence over the "Speicher" massacre, named after the base from which the victims were captured before being executed.
"After deliberations, the court finds that the evidence collected is sufficient to convict 24 defendants," said the judge. "The court decided they will be executed by hanging."
Around 600 bodies of victims have been exhumed from burial sites in the Tikrit area. Footage released by ISIS last year shows some of the captured recruits were shot and pushed into the Tigris river.
Relatives of some of the Speicher massacre victims were heard by the court asking that the perpetrators of what is one of ISIS's worst atrocities be punished.
The judge showed one defendant a grainy printout of a grab from the video footage of the massacre.
Combined with a call by the country's top Shiite cleric Grand Ayatollah Ali al-Sistani for Iraqis to take up arms against them, the Speicher massacre played a key role in the mass recruitment of Shiite volunteers to fight the terrorists.
One of the spots where the Speicher cadets were executed is a police building in the sprawling Tikrit palace complex former dictator Saddam built in his hometown.
The quay where the victims were shot in the head and pushed into the Tigris has, since Tikrit was retaken, been turned into an improvised shrine.
Relatives, many of whom may never have a body to bury, have streamed to the site over the past two months along with, delegations of officials and people.