The film begins with Thomas' disembodied voice introducing himself and the Island of Sodor.
Gordon (Neil Crone) is waiting for Thomas (Edward Glen) at Wellsworth Station. When Thomas arrives, Gordon scolds him for being late. Thomas explains that he's off to pick up Mr. Conductor (Alec Baldwin) who is coming to take care of the Sodor Railway while Sir Topham Hatt goes on a much needed vacation. Gordon is unsure about whether they need Mr. Conductor or not until a large scary-looking train named Diesel 10 (also voiced by Neil Crone) speeds past them menacingly
On the opposite side of the planet, the Indian Valley and Shining Time Station is introduced where we meet Mr. Conductor for the first time.
In the Big City, eleven year old Lily Stone (Mara Wilson) is preparing to visit her grandfather Burnett Stone (Peter Fonda); a retired railroad engineer who now lives a solitary life, because his wife, Tasha (Laura Bower), has recently passed away. Lily finds a black and white photograph of her grandpa and grandma. She decides to bring it along with her.
Back at Shining Time, a twelve year old boy named Patch (Cody McMains) finishes giving the station's "Welcome" sign a fresh coat of paint, just in time for his boss Billy Twofeathers (Russell Means) to appear in his steam locomotive, the Rainbow Sun. As Billy waves to two children in field, he sees a motorcyclist driving along the country-road. The motorcyclist cuts in front of the train at the railroad crossing, startling Billy to stop the train.
When Billy arrives at the station, he congratulates Patch for painting the sign. Patch then tells Billy about some shadowy lines he found on his map. After a brief talk about it, Patch goes to Muffle Mountain, to do some chores for Burnett Stone. Billy calls after him, telling him to be on the lookout for a 'stranger'.
When Billy and Mutt arrive on the station's platform, they find Burnett's old rival P.T. Boomer (Doug Lennox), the one who cut in front of Billy's train. Boomer asks for Burnett's whereabouts, but Billy stonewalls him; telling Boomer to "not to mess with the innocence of the Indian Valley". Boomer walks away, pausing to whack Mr. Conductor's flower basket. Billy picks up the flowers and walks into the station; where he looks over a child's drawing with Stacey Jones (Didi Conn); the station's manager. Noticing the signature, they realize that it was made by Burnett as a kid.
Back on Sodor, Thomas is talking with James (Micheal Angelis) at Tidmouth Sheds when they are suddenly confronted by Diesel 10; who reveals his wicked plot to destroy a lost engine named Lady which would completely destroy a place called the "Magic Railroad". James is confused, but Thomas is angry as he follows Diesel 10; saying that he is picking up Mr. Conductor later, who won't let him cause any damage.
At the Scrapyards, James, Percy and Toby are talking about what the "Magic Railroad" could be. They don't know that Diesel 10's two henchdiesels, Splatter (also voiced by Neil Crone) and Dodge (Kevin Frank) are eavesdropping on their conversation before setting off to meet with th
In the Quarry, Diesel 10 is admiring a statue of his face that he has carved into the rock. Splatter and Dodge arrive, asking him how he did it, and in response Diesel 10 reveals to them his gigantic claw "Pinchy", which he says he will use to destroy the lost engine.
At Shining Time Station, Mr. Conductor is preparing to leave for Sodor. He somehow is having trouble with his gold dust that has him travel from both Shining Time Station and the Island of Sodor. He succeeds in departing for Sodor. Thomas finally meets up with Mr. Conductor and brings him to Knapford Station.
Later, Thomas and the engines are discussing about how to stop Diesel 10, unaware that Splatter and Dodge are spying on them. Splatter and Dodge begin to tease Thomas, until Harold The Helicopter flies by; spraying dust everywhere!!
At Sir Topham Hatt's office, Mr. Conductor recieves a telephone call from Sir Topham Hatt and recieves his instructions.
That night, Diesel 10 sneaks up to Tidmouth Sheds and knocks over the barriers that are covering over a big hole in the sheds' wall; awaking Thomas, Mr. Conductor, and the other engines. Diesel 10 tries to force Mr.Conductor to tell him where the lost engine is been hidden, but Mr. Conductor scares Diesel 10 away with bag of sugar, threatening to seize up Diesel 10 with the sugar.
At Muffle Mountain, Burnett Stone looks at a painting of Lady and says that he's sorry for letting her down. When he arrives home, Boomer confronts him; asking for Lady's whereabouts, but Burnett refuses to reveal where Lady is being hidden and he sends Boomer away.
Later that night, Mr. Conductor has a dream; that Shining Time Station is no longer a safe place without the magic. Mr. Conductor instantly realizes that he has to find some more gold dust...and quickly!
The next morning, Lily goes to the Big City Train Station; whereupon Mutt the dog directs her onto the wrong train (the Rainbow Sun); because P.T. Boomer is on the station's platform; talking in a telephone booth about buying Shining Time Station.
At his mountain house, Burnett Stone looks at a book about railroading. He somehow hears a distant train whistle from far away in the mountain.
On Sodor, Mr. Conductor helps James get rid of a big itch on his nose. Then, Mr. Conductor decides to go to the windmill to look for the clue to the gold dust source. He somehow gets lost on a waterfall. He then realizes that he's completely out of his gold dust and that he must find some more and quickly!
Thomas and the engines all figure out that if Diesel 10 finds Lady first, that would destroy them all. As Thomas leaves, he is challenged to a race by Bertie The Bus, but Thomas denies racing with Bertie; saying that he must be a Really Useful Engine and that he must solve some mysteries instead. Following this scene, Thomas stops at a railroad crossing to let George The Steamroller go by.
On top of the waterfall, Mr. Conductor eats some vegetables to help himself think properly. He gets an idea and he decides to call his cousin Junior (Michael E. Rodgers).
At the Railyard, George enviously watches Gordon on the turntable. Diesel 10 rumbles by and promises George the turntable as a reward...if George would do Diesel 10 a favor: destroy all the buffers on Sodor; in hopes of finding the connections of the Magic Railroad.
Mr. Conductor finds some bellflowers and calls Junior (who is at a beach at this point) and tells him to go to Shining Time Station and fetch his extra supply of gold dust. When Junior tries to ask for more information, the phone's tracking lines go dead.
Meanwhile, on Muffle Mountain, Boomer digs at the base of a cliff; looking for Lady. He doesn't know that Patch is spying on him from nearby. Patch then rides off to tell Billy Twofeathers.
Lily arrives at Shining Time Station. She meets Junior for the first time. When Junior leaves, Lily finds some of the gold dust that Junior has left behind.
On Sodor, George destroys a set of buffers but realizes that Diesel 10 wants him to destroy all of the buffers on Sodor. George begins to worry.
Mr. Conductor, meanwhile, is sleeping at bottom of a hill. Thomas passes him; calling out his name. Mr. Conductor tries to answer, but Thomas is too far away to hear.
Stacey Jones meets Lily and takes her to meet up with Burnett. When they arrive at a crossroads; they find Burnett and Boomer confronting each other again. After Boomer leaves, Burnett and Lily drive home. That night, they hear a distant train whistle from far away. Patch, who is outside practicing with his horse, hears the strange whistle as well.
Night has fallen on Sodor. Percy meets up with Thomas at Knapford Station, and they both figure out that Mr. Conductor travels on a secret railway from Shining Time Station to Sodor. Diesel 10 overhears their conversation and leaves to tell his gang. At the Scrapyards, he tells George, Splatter, and Dodge about his new wicked plot to destroy the Magic Railroad, as well as the lost engine. Toby, who has secretly followed Diesel 10 to the Scrapyards, rings his bell, startling Diesel 10 who swings his claw around, knocking over the shed that he and his gang are in, trapping them inside.
After the "Really Useful Engine" song sequence, Thomas goes to a siding and finds Henry looking rather ill. Thomas offers to get some special coal for Henry. Upon collecting the coal, Thomas doesn't notice that the last coal car accidentally disappears into an old set of buffers. Thomas later tells Percy about the missing coal car and they both figure out that the old set of buffers could be the entrance to the Magic Railroad.
Meanwhile, Mr. Conductor is walking along an embankment when suddenly Diesel 10 appears. Diesel 10 grabs Mr. Conductor with his claw and dangles him over the edge of the viaduct; threatening to drop him off the viaduct if Mr. Conductor doesn't tell him where the Magic Buffers are. Mr. Conductor succeeds in getting free by cutting a hydraulic hose on Diesel 10's claw; which rockets him to the windmill. There, Mr. Conductor finds the clue to the gold dust source: Stoke up the magic in the mountain and the Lady will smile; then watch the swirls that spin so well.
Splatter and Dodge later find Diesel 10 and they ask why he let Mr. Conductor escape. Diesel 10 says that he was testing Mr. Conductor, but Splatter and Dodge don't trust that and they tease their boss about "training" pants. Angrily Diesel 10 bashes his claw against the coal chute, causing the coal to fall out on top of him. At Muffle Mountain, Lily meets Patch, who takes her to Shining Time Station (Burnett tells Lily to come back by the time the sun sets). When they arrive, they find Boomer confronting Billy Twofeathers again. After Billy drives away on the Rainbow Sun, Boomer leaves the station on his motorcycle.
Inside the station, Lily meets Junior again who takes her to Sodor. They meet up with Thomas who takes them to the windmill where Mr. Conductor is.
Mr. Conductor tells Junior about the clue to the gold dust source and then he (Mr. Conductor) recieves another telephone call from Sir Topham Hatt. Junior climbs onto the windmill (much to Thomas' dismay), and accidentally gets tossed onto Diesel 10.
On a cliffside of Muffle Mountain, Patch tells Burnett about Lily's disappearance and Burnett comforts Patch and says that they will find Lily. After Burnett walks away, Boomer confronts Patch and pursues him, demanding where Lady is.
Night falls on Sodor. Percy travels to the old sidings and sees Splatter and Dodge trying to make George destroy another set of buffers. Percy hurries off to warn Thomas. Mr. Conductor and Lily are camping by the tracks while Thomas watches them. They all figure out that Burnett is the one holding the clue to the gold dust source.
In Burnett's workshop, Burnett shows Lady to Patch. Then, Burnett reavels about Lady's past: Burnett has been promoted as Lady's caretaker by Mr. Conductor's family, but Boomer has crashed Lady long ago. After the incident, Burnett takes Lady into the workshop to fix her up.
Patch and Burnett both realize that the Magic Railroad is fading away because of the lack of energy.
On Sodor, Percy tells Thomas that they must get Lily back to Muffle Mountain before the Magic Railroad gets destroyed. Mr. Conductor encourages Thomas to take Lily home. Thomas hesitates at first, but when he sees Lily smiling at him, he agrees to take her home.
Thomas, with Lily in his cab, succeeds in entering the Magic Railroad (through the Magic Buffers). They find the missing coal car and they bring it along with them. They arrive on a cliff of Muffle Mountain and Lily hurries off to find her grandfather. As soon as she is gone, Boomer sets off an explosion that blows Thomas off the cliff. Boomer chases after Thomas, believing that Thomas is just a huge train plaything. This leads them into falling into another portal of the Magic Railroad.
Lily meets up with Burnett; where she discovers Lady. She concludes that the special coal that she and Thomas have found can bring Lady back to life and she encourages Patch to fetch the special coal.
On Sodor, Diesel 10 roars into the Scrapyards, with Junior still on his roof. They encounter James inside the Smelting Shed. Junior gets flung onto James's roof. Diesel 10 then tries to force them into a melting pit, but Junior manages to save himself and James, by transporting them in a cloud of gold dust...out of the Smelting Shed and to a location near the Magic Buffers. They meet up with Mr. Conductor and Percy.
By now, Burnett manages to get Lady into steaming up. Along with Lily, Patch, and Mutt they all drive out of the workshop and onto the Magic Railroad. They meet up with Thomas and they all arrive back on Sodor where they meet up with Junior, Mr. Conductor, and Percy.
Suddenly, Diesel 10 and his gang appear from far away. Diesel 10 starts to chase after Lady and Thomas, but Splatter and Dodge back out. Boomer flies out from the Magic Buffers and he lands atop of Diesel 10. Burnett jumps into lady's cab and vows to never let Lady down again. Mr. Conductor warns them about the viaduct, but then he and Junior realize, after the engines have rushed off, that Lady is the answer to the gold dust source.
The chase finally comes to the viaduct. As Burnett and Lady cross over the viaduct, it begins to crumble, leaving a big hole in the viaduct. Thomas heroically jumps over the gap and Burnett congratulates him.
Diesel 10, however, can't stop in time. He slides over the big hole in the viaduct and he and Boomer both tumble into the ravine below; landing in a passing barge of sludge. Diesel 10 looks on the bright side; saying that it's "a good time fo the year for a cruise".
Lady, Burnett, and Thomas meet up again with the rest of the gang and they finally solve the clue of the gold dust source. Lily mixes some golden shavings and some water together and tosses it into the air; which transforms into gold dust. As the two conductors refill their whistles with the new gold dust Thomas calls Lady a really useful and helpful engine.
We flash forward into the future where Lily and Patch are both adults, are married, and they have a little son. Lily recounts the story to her son as they look at photos from the Indian Valley and the Island of Sodor.
The movie happily finishes as Thomas chuffs off into the sunset.