The film is a film-within-a-film, wherein Thomas, Emily, Percy and their friends create havoc in a screening room, where they are about to watch The Thomas and Friends Season 6 Movie (The Muppet Movie). When asked by Bertie if the film depicts how Thomas and Friends Season 6 began, Thomas responds "It's sort of approximately how it happened." As the story opens, Thomas is enjoying a relaxing afternoon in Tidmouth Sheds, singing a tune (the Oscar-nominated "Rainbow Connection") and strumming his banjo, when he is approached by an agent named Miles Callisto (from Miles from Tomorrowland) who recognizes his talents and encourages Thomas to pursue a career in Hollywood.
Inspired by the idea of "making millions of people happy," Thomas sets off on a cross-country trip to Hollywood, initially via bicycle but eventually via Studebaker after teaming with Percy, who had been working as a hapless stand-up comedian in a sleazy bar, whose husband and wife are cameoed by Clover and Sofia (from Sofia the First) respectively. During their journey, they are pursued by the villainous Captain Hook (from Jake and the Never Land Pirates), owner of a struggling French-fried frog legs restaurant franchise, and his shy assistant, Mr. Smee (from Jake and the Never Land Pirates).
Captain Hook wants Thomas to be the new spokesman for his restaurants, but when Thomas refuses, Hook refuses to accept "No" for an answer and resorts to increasingly threatening means of persuasion. Thomas and Percy's journey also includes misadventures which introduce them to a variety of eccentric characters, some played by characters, others played by Thomas and his friends. During one of their drives, they encounter Phineas Flynn (from Phineas and Ferb) and offer him a ride. Phineas declines stating that he's heading to New York City to make a debut in public television. Thomas and Percy encounter Duck and the Engines and their manager Toby who plan to turn an abandoned church into a coffee house.
They manage to disguise Thomas' car so that Captain Hook can't recognize them. They end up encountering James and Mavis whom had been working as plumbers until their truck crashes into Thomas and Percy's car. When it comes to getting a replacement car from a used car dealer owner The Cat in the Hat (from The Cat in the Hat Knows a Lot About That!), they meet Cranky and invite him to join them. Cranky runs off and Thomas drives away unbeknownst that Cranky has left to pack his things. At a carnival, the group meets Emily following a beauty contest (she falls in love with Thomas in the process). She joins Thomas and Percy as they continue traveling to Hollywood. Cranky is still trailing Thomas. At a local motel, Thomas meets up with Edward (who works as a pianist at a lounge). Captain Hook and Mr. Smee kidnap Emily and Hook sends a call to Thomas to exit the motel where Thomas runs into Hook's henchmen because Captain Hook said that if Thomas didn't, Emily would be slaughtered. Thomas has hired a mad sorcerer named Cedric the Sorcerer (from Sofia the First) in an attempt to brainwash Thomas. Fortunately, the sorcerer insults Emily just before he starts the process, causing her to break free in a rage and defeat Captain Hook's henchmen.
Immediately after freeing Thomas, Emily gets a call from her agent about a job and leaves Thomas to attend it. Following a problem with the film, the movie continues as Thomas' group is now joined by Edward. Meanwhile, Captain Hook goes to an even further scheme by hiring an assassin named King Sombra (from My Little Pony: Friendship is Magic) who kills trains for a living. Captain Hook broadcasts on the CB Radio threatening for Thomas to surrender and agree to Captain Hook's deal or he will become a frog burger. When night falls, Thomas' car breaks down leaving the group stranded in the desert. Luckily for Thomas, the Engines and Toby arrive in their bus having followed the script that Thomas left behind and end up taking them to Hollywood. The next day, Huckleberry Hound (from Yogi Bear) appears to Thomas disguised as a motorcycle policeman to warn Thomas that Captain Hook has hired an assassin to kill Thomas. Refusing to be hunted any longer, Thomas attempts a Western-style showdown in a ghost town where the group meets Skarloey and his assistant Rheneas (who owns a laboratory in a ghost town). Thomas breaks tradition by trying to talk Hook into backing off, but Hook refuses and orders his henchmen to kill him and all his friends.
Thomas is saved only when one of Skarloey's inventions, "insta-grow" pills, temporarily turn Henry into a giant who is able to permanently scare off Hook and his men. Thomas, Emily, Percy and the gang proceed to Hollywood, where they finally meet the imposing producer and studio executive Charlie Brown (from Peanuts), and hires them on the spot under "the standard rich-and-famous contract" after Thomas reveals why they've come. The film ends with Thomas, Percy, Emily and the gang attempting to make their first movie, which turns out to be a surreal pastiche of their experiences, hinting that the movie they're making is the same one the audience has been watching all along, but a huge stage accident occurs causing most of the props to collapse and fall, and cause the lights to explode. As the dust around shattered roof clears, a stream of rainbow appears, and Thomas, Emily, Percy and the gang joined in by other Thomas and Friends Season 6 characters, the characters from Sofia the First, Doc McStuffins, Jake and the Never Land Pirates and numerous other characters sing one last reprise of "Rainbow Connection", ending the film. After the end title appears, Cranky tears through the screen "finally" having caught up with the others to the amusement of the audience who then talk amongst each other as the credits roll. After the credits finish rolling, Henry tells the viewers to go home, then he says goodbye and passes out.