Percy the small engine's parents go on vacation and leave their son in charge of the island they live on, leaving him and his friends to race for fun. Their enjoyment is derailed when an evil intergalatic nightmare tran named Cerberus arrives at peaceful Percy's Island and attempts to take over after he conquered his own planet's racetracks. He turns the four island's guardians: Diesel 10 the Claw Diesel, Smudger the Rude Engine, Spencer the Silver Engine and Diesel the Devious Diesel into his henchmen. The only solution available to the island's inhabitants is to defeat Wizpig in an elaborate series of races that involves cars, hovercrafts, and aeroplanes. Poor Casey Jr the circus engine, the best racer on the island, tries to beat this challenge, but fails, and is transformed into an American Standard 4-4-0, or American Type Steam Locomotive, by Cerberus's black magic.
Percy recruits a team of ten racers: Thomas, the first recruit; Toots the Old Engine and Edward the Blue Engine, recruited by Thomas; Duncan the stubborn engine, Thomas's enemy who follows after him; and Oliver the Great Western Engine, Jiminy Cricket, Tillie the little engine that could, Toby the Tram Engine, his wife, Emily the Emerald Engine, and his sister, Molly the Holden Engine, inhabitants of Percy's island. They eventually complete all of Cerberus's challenges and confront Cerberus himself to a race and defeat him. Shortly afterwards, Casey is turned back into a circus engine, before Cerberus leaves for his home planet, Future Fun Land. Fearing that Cerberus would again attempt to invade Percy's Island, the islanders travel to Future Fun Land for a second challenge. When Cerberus loses the second race, the rocket he rides on malfunctions and blasts him to the moon, and peace returns to Percy's Island for good. However, that peace may be short lived, as it is shown in a small scene that shows Cerberus's spaceship flying through the sky. Cerberus is then heard laughing, indicating that he may return one day. All of his henchmen are free from his control and with the two Triceratops kids on Percy's side, they all have fun together with Thomas and all his friends.