Sir Topham Hatt and Vee, normally in charge of the railways on Sodor and Chuggington, are on holiday and have left Mr. Conductor and Conductor Jr. in charge. Meanwhile, Thomas, Brewster, Wilson, Koko, Hodge, Zephie, RJ and Gordon encounter an evil diesel locomotive, Diesel 10, stating he has unfinished business on Sodor and he wants to finish it quickly. Thomas, his friends and Gordon are shocked.
Mr. Conductor has problems of his own. The mysterious gold dust that allows him to magically transport from place to place is running out, and without it there will be no way for anyone to travel to Sodor. The lost engine is able to travel between Sodor and Muffle Mountain via the Magic Railroad, but nobody knows where she is.
An old man named Burnett Stone lives on Muffle Mountain, near Shining Time Station. Unknown to everyone, he is the guardian of the lost engine whose name is Lady. The engine crashed after an earlier encounter with Diesel 10, and ever since then he has been trying to repair her, so far without success.
Thomas, Koko, Wilson, Brewster, Zephie, Hodge, RJ and Percy find out that there is a secret railway and there are magic buffers that lead to it. However, Diesel 10 overhears them. Toby the Tram Engine follows him and hears him telling Splatter and Dodge (whom collectively he calls "Splodge"), his diesel locomotive henchtrains, that he will find the buffers and destroy the steam locomotives by destroying the Golden Engine. This is largely because Mr Conductor's sparkle is running out and he is too weak to stop him. Toby suddenly rings his bell and Diesel 10, Splatter and Dodge hear it. During this point, Diesel 10 says "It's the old teapot! Smash him!" and then accidentally fractures the foundation of the shed they are sheltering under and it collapses on them while Toby runs off.
Burnett's granddaughter Lily comes to visit him. During her stay, she meets Conductor Jr., Mr. Conductor's son, who takes her to Sodor and introduces her to the talking engines who live there, including Thomas, Koko, Wilson, Brewster, Zephie, Hodge and RJ. Later, Thomas, Percy and the trainees are assigned to take Lily back, having discovered the start of the long-abandoned Magic Railroad by an old grotto. They find a truck of special Island of Sodor coal and take it with them. They arrive on the side of Muffle Mountain, and Lily goes to her grandpa's house, leaving Thomas, Percy and the trainees stranded on the mountain. Suddenly, they fall off the mountain and roll all the way to the bottom where they re-enter the Magic Railroad through another portal there.
Lily reunites with Burnett at his workshop, where he shows her Lady, the lost engine, and explains his problem getting the engine to steam. Lily suggests using Island of Sodor coal from the truck Thomas and the trainees brought. This proves to be exactly what was needed, and the engine comes to life. For the first time in years, Burnett smiles. Lily and Burnett take Lady along the Magic Railroad, which regenerates beneath her wheels. As the Magic Railroad is reborn, Lady's face appeared, commenting that Burnett had never given up on Magic. The team reunites with Thomas, Koko, Brewster, Wilson, Hodge, Zephie, RJ and Percy and find their way back to Sodor, where Diesel 10 finds them and gives chase. He is foiled by a damaged viaduct, which collapses beneath him.
Thomas, Percy, the trainees, Lady, Burnett and Lily meet Mr. Conductor and Junior. They use the water from a wishing well and shavings from the rails of the Magic Railroad to make more gold dust, and the Island of Sodor is saved.