Maik Schneider, 29, a local politician of the far-right NPD party, received an additional term of one year and six months for other xenophobic crimes.
A co-accused right-wing extremist was sentenced to seven years behind bars for the August 2015 arson in the high school sports hall in Nauen, a town 40 kilometres west of Berlin.
It was among a spate of hate crimes to shock Germany at a time when Europe’s top economy took in an influx of refugees and migrants that neared 900,000 in 2015 alone.
Four other men received lesser, suspended prison terms of between eight months and two years.
The attack caused property damage worth €3.5 million.
The judge, Theodor Horstkötter, said the crime was clearly motivated by hatred of foreigners.
“The attack was meant to signal to refugees: you are not welcome here, we don’t have space for you, you aren’t safe here,” the judge said at Potsdam court near the capital Berlin.
Schneider had claimed during the trial he had only meant to char the building and not burn it to the ground, and denied racist motives.
Prosecutors had charged that the six men had formed a criminal organisation by coordinating their actions in a WhatsApp group, reported news site Spiegel Online.
They had previously heckled at town events and yelled xenophobic slogans, set fire to the car of a Polish citizen, set off an explosive device at a supermarket, and thrown a bag of paint at the office of a left-wing politician.
The NDP, or National Democratic Party of Germany, is an “anti-democratic, xenophobic, anti-Semitic, anti-constitutional party,” according to Chancellor Angela Merkel’s office.
However, a bid before Germany’s highest court to outlaw the NPD failed in January when its judges ruled that the fringe party, although openly racist, was too insignificant to spell a real threat to the democratic order.