Hiraya Sia is conceived for a single purpose: to serve as a bone marrow donor for her older brother Jace, who has thalassemia major, a severe blood disorder. Her father, a linguistics professor, names her "Hiraya," an ancient Tagalog word meaning the power of the mind to bring the nonexistent into being. Despite her parents' narrow expectations, Hiraya develops a passion for songwriting in purple notebooks. A nurse named Mary Beth hums a wordless lullaby to her as a premature infant, carrying the wish "Live. Breathe. Be," and this melody surfaces in every song she writes.
When Hiraya is 15, Jace dies brain-dead after a drunk driver hits his car. He had been driving home from college to watch her perform at a coffeehouse for the first time, and she carries the secret guilt of having asked him to come. She abandons her name, going by "Raya," destroys her guitar, stops writing music, and enrolls in medical school to pursue Jace's dream of becoming a doctor.
Quentin Chen Philips Jr. adopts the name "Q" the day after his father, an artist, dies by suicide, stepping in front of a train. He chooses the name to spare his mother from hearing his late father's name. Q grows up painting strange dreams: glowing spheres on an ocean, fragments of a mysterious world. He becomes a celebrated portraitist, but a degenerative eye disease progressively shrinks his vision to pinhole size. Standing on a train platform, he contemplates following his father's path, then pulls back and hurls his last painting onto the tracks.
Ten years after Jace's death, Raya rides the subway on the anniversary of his death. A fellow passenger's daydream pulls her from the subway car into a vintage train carriage. A woman named Lily, the train's conductor, explains that the Elsewhere Express collects people who have lost their sense of purpose. The train is built entirely from waking thoughts: daydreams, memories, poems, and songs. Raya's ticket melts into her palm as a golden eternal knot, serving as both ticket and bond.
Q boards the same evening through a back door, arriving as an unscheduled second passenger. His sight is restored aboard the train, and he believes the experience is a vivid dream. Lily conducts orientation, explaining the train's strict baggage policy: Passengers cannot carry both past and future, and a pharmacist's blue serum can erase unneeded memories. Those who refuse risk becoming Echoes, spectral faces in the ocean whose golden knots unraveled under the weight of their memories, severing their bond to the train. Both decline the serum. A storm forces Lily to send them deeper into the train.
Raya and Q travel through interconnected cars built from different kinds of thoughts. On a crescent-shaped island, Raya instinctively selects a glowing song sphere to heal Q's bruised elbow, revealing a latent musical gift. As they journey onward, Q confesses his eye disease and his moment on the platform. He observes that Raya clings to a purpose not truly her own, pursuing medicine for Jace rather than for herself.
In a secret room, Lily and Rasmus, a former conductor, reveal that a stowaway once destroyed an entire dining car with a creeping rot. They erased their memories of the incident but retained one warning: if it rained on the train, the danger had returned. It has rained. At the Archive, Rasmus gives them a map that imprints inside both of them, tethering them with an eternity knot so they share its weight and sense each other's emotions. He warns that if one dies, the other will be crushed.
At the gallery car, Raya's reflection drags her underwater through paintings depicting her life, forcing her to relive the night of Jace's death and exposing her guilt. The stowaway confronts them: a humanlike figure covered in black moth wings that breaks apart into swarms. They are hurled into the Missed and Misplaced Department, a locked car where lost objects rain from the sky. A sentient echo reveals that the Echoes are not fallen passengers but discarded memories, and the conductor's story is a lie to frighten passengers into drinking the serum.
Raya writes a song that repairs their shattered transport, rediscovering her musical gift. Their vehicle accidentally delivers them to the Wandering City, a restless car built from fleeting thoughts, where a perfumer named Manon hides behind a locked door. Manon proves that keeping one's memories without becoming an Echo is possible. She offers a fragrance that can restore any lost memory, which Q takes to help Rasmus and Lily remember how they defeated the first stowaway.
When the stowaway appears at the engine, Raya sees Jace's face and hears him calling her name. Q sees only a faceless swarm. Raya releases the captured stowaway, fracturing her alliance with Q and Rasmus. In a hidden hospital room beneath their compartment, they later find the trapped first stowaway: a bandaged figure wrapped in Raya's own funeral song for Jace. She accepts it is not her brother and asks Q to destroy it. But the second stowaway drags Raya into the void.
At the boarding car, Q thrusts his hand into the stowaway's chest, trusting touch over sight. The moths' wings reveal the stowaway's origin: It was born not from Q's darkness but from the guilt of the first version of Raya, who became Lily after boarding the train long ago. Q jumps from the train at sunrise, landing at the platform on the night he nearly died. Recognizing that returning would reignite the cycle, he walks away, abandoning his restored sight.
Raya joins the maintenance crew, writing songs that accelerate repairs. Through the train's passenger records, she uncovers the full truth: Lily is the first version of Raya. When that first Raya drank the memory serum after Q's sacrifice, a single dose could not purge her guilt over both Jace and Q. The residual guilt grew wings, becoming the stowaway that haunts every cycle. Multiple versions of Raya already live aboard under different names, each having drunk the serum and forgotten. Raya confronts Lily, forcing her to acknowledge the stowaway was born from her own guilt. Lily passes the conductor's role to Raya and leaps from the train, removing herself as the source.
Raya serves as conductor until another version of herself boards. In the new passenger's bag, she finds a black-and-gold invitation to an art exhibit called "Here" by Q Chen Philips Jr., with a message: "On the count of three. Jump." Raya leaves the conductor's cap for Rasmus, opens the back door, and counts to three. She travels to Q's exhibit. Q, blind again in the outside world, has left a recorded message: The train did not let him keep his sight, but he brought home the ability to create art that lets people walk through worlds. He reveals that his childhood dreams of glowing spheres were her songs and asks her to add her music to the exhibit. His message ends with the wish: "Live, Hiraya. Breathe. Be."
At the station, Raya finds Q. He cannot see her but recognizes her voice and traces her face with his hands. She leads him through a sunlit terminal, and when he asks where they are going, she lays his palm over her heart and tells him she thinks it is their stop.