In 2014, an attempt to counteract global warming through climate engineering backfires catastrophically, causing another ice age and extinguishing all life. The only survivors are on the Snowpiercer, a massive train traveling on a circumnavigational track created by the transportation magnate and inventor, Wilford. By 2031, elites inhabit the extravagant front cars while the "scum" inhabit the tail in squalid and brutal conditions. Under watch by Wilford's guards, they are brought only gelatinous "protein blocks" to eat. Conspiring with Gilliam, Curtis's mentor and the leader of the tail, and Curtis's second-in-command Edgar, Curtis Everett plans to lead the tail passengers in a revolt that will take them all the way up to the engine, a perpetual motion machine. A woman named Claude and armed guards come to take two small children, Andy and Timmy; claiming that it is for a mere medical exam. Andy's father, Andrew, attempts to fight back, but is punished by Mason by being forced to put his arm into the extreme cold outside the train, effectively amputating it. Enraged, Curtis initiates their plan the next time they are fed. Curtis realizes that the guards have no ammunition, having apparently used all of it in prior tail rebellions. Curtis and the tail passengers easily rout them and take the security and prison cars, seeing daylight for the first time in over a decade.
In the prison car, Curtis releases security expert Namgoong Minsu and his clairvoyant daughter Yona so he can disable the locks between cars, offering them a hallucinogenic drug "Kronole" as payment. Gilliam suggests that if they take the water supply car, they will control any negotiations with Wilford. Instead, they are ambushed by an enormous group of masked men with hatchets, spears and other melee weapons that is overseen by Mason and Franco. The train then plunges into a long tunnel, plunging the rebels into darkness. The masked men are equipped with night vision goggles, but the insurgents are quickly able to fashion some torches, which levels the playing field. In the ensuing bloody combat, Curtis reluctantly allows Edgar to be killed so he can capture Mason. The next day, some of the insurgents continue on with her as a hostage while the rest remain behind to tend the injured and guard the prisoners. They travel through many luxurious cars, learning that the train has a fully supported ecosystem and serves delicacies to the upper class passengers such as sushi. Curtis also learns that the protein blocks they have been served for nearly two decades are actually paste from ground up cockroaches.
The group arrives at a classroom, where the teacher expounds to the children and the rebels on the greatness of Wilford and the "sacred engine". While distracted by the celebration of the New Year marking one circumnavigation of the globe, the teacher ambushes them with a loaded submachine gun, killing Andrew before Grey kills her. Further back, Franco and Mason's soldiers use the same distraction to kill the rest of the rebel army. Franco executes Gilliam, and Curtis kills Mason in revenge. Curtis' group continues forward, followed by Franco, leading to a violent fight in a sauna car during which Franco kills Grey and mortally wounds Tanya before Curtis and Namgoong seemingly kill him. Finally, the only three survivors of the revolution, Curtis, Namgoong and Yona make it to the gate to the engine at the front. Curtis attempts to get Namgoong to open the gate to the engine, but he refuses, revealing that he plans to use the highly flammable Kronole as an explosive to blow a hatch to the outside, as he has observed several signs the world outside is thawing and may be hospitable to life. Curtis confesses to him that shortly after boarding the train, the tail passengers resorted to cannibalism to survive, and he is haunted by his part in it. He was nearly ready to kill the infant Edgar when Gilliam offered his own arm instead. Meanwhile, Franco is revealed to have survived and makes his way toward the engine.
Wilford's assistant Claude emerges from the engine, shoots Namgoong, and invites Curtis inside where he finally meets Wilford, revealed to be an old man. Wilford reveals to Curtis that his revolution was actually orchestrated by himself and Gilliam to reduce the population and maintain the balance of the sealed ecosystem, and subsequently orders the elimination of 74% of the remaining tail passengers. He explains the importance of using fear and chaos to maintain order and leadership on the train. After letting Curtis experience being alone for the first time in seventeen years, Wilford asks Curtis to replace him. Curtis appears ready to accept, when Yona runs in and pulls up a floorboard, showing Curtis that small children from the tail section, including Andy and Timmy, are being used as replacement parts for "extinct" machinery; the tail section serves to provide this resource for the engine. Curtis subdues Wilford and sacrifices an arm to save Timmy from this work, though Andy refuses to be saved. Namgoong revives and finally kills Franco as Yona lights the fuse on the Kronole. However, the door to the engine short-circuits and doesn't close, forcing Curtis and Namgoong to tightly embrace Yona and Timmy, protecting them from the blast. The explosion triggers an avalanche that derails the train. Yona and Timmy, apparently the only survivors, emerge from the wreckage and see a polar bear in the distance – proof that life exists outside the train.