The student at Fairvale High School, in western Sydney, was 14 years old when the other students prevented him boarding a bus on October 16, 2017.
The pack then walked him to a nearby park where footage taken on one of the students' phones showed him being spear-tackled, kicked, punched and stomped in a lengthy beat-down.
Police found the footage of the assault on Instagram.
The student was left with serious ear, eye and skull injuries along with severe psychological damage.
The now-21-year-old sued NSW via his mother, alleging the state school owed him a duty of care and failed that by not monitoring the students as they moved towards the bus after class hours.
While the student who instigated the attack - known in court papers as XY - was known to have violent tendencies and had just returned from a related suspension, Fairvale did not conduct a proper risk assessment before he came back to school.
According to a Supreme Court judgment, one of the victim's classmates told him XY wanted to speak to him.
He went back into the school and tried to seek refuge at the office, but it was closed, while calls from his mother to the school to warn them of the danger were diverted to the answering machine.
Justice Joanne Harrison found there were no teachers on bus duty who could have deterred the pack or intervened when they took the victim to the park to deliver the beating.
Other duty of care breaches included not keeping students safe from bullying, not keeping the school office open after hours for students who need safety and not protecting vulnerable students with physical or psychological issues.
The victim had been diagnosed with autism spectrum disorder in 2012.
"The severity and multitude of the breaches … were inconsistent with a primary duty of the school: to keep its students safe," Justice Harrison wrote.
The judge dismissed the state's argument it wasn't liable for the assault because its duty of care didn't extend outside school boundaries, or outside operating hours.
She awarded the student $1.2 million in damages for non-economic loss, future economic loss, past out-of-pocket expenses, future medical expenses and future attendant care.