U.S Army pilot Captain Colter Stevens wakes up on a Metra commuter train headed to Chicago. Stevens is disoriented, his last memory before that was being on a mission in Afghanistan. To the world around him – including his traveling partner Christina Warren and the bathroom mirror – Stevens appears to be Sean Fentress, a school teacher. As he comes to grips with this revelation, the train explodes, killing everyone aboard.
Stevens regains consciousness inside a dimly lit cockpit. Communicating through a video screen, Air Force Captain Colleen Goodwin verifies Stevens’ identity and insists he stay “on mission” to find the train bomber before a second bomb hits downtown Chicago in six hours. Stevens is inside the “Source Code”, an experimental device designed by scientist Dr. Rutledge. In the machine he experiences the last eight minutes of another compatible person’s life within an alternative timeline.[a]
Stevens is unwillingly sent back into the Source Code repeatedly in frustrating, exhausting attempts to learn the bomber’s identity. He tries to warn authorities on the train and flee with Christina, escaping the explosion. Other times, he cannot locate or disarm the bomb in time and dies on the train. Later, Stevens learns that he has been with them for two months since being reported killed in action in Afghanistan. In real life he is comatose and is missing most of his body, he is on life support while hooked up to neural sensors. The cockpit capsule is a projection of his brain as it attempts to make sense of a missing environment. Angry at learning that he is on life support, he asks to be disconnected after the mission and Rutledge agrees.
Stevens finally catches the bomber, a man named Derek Frost. Frost leaves his wallet behind to fake his own death and gets off at the last stop before Chicago. In their first encounter, Frost kills both Stevens and Christina and flees in a rented white van with a dirty bomb in it. Stevens remembers the license number and direction and reports it to Rutledge when he returns from the Source Code. The authorities use the information to catch Frost, preventing him from detonating the dirty bomb. Rutledge reneges on his promise to let Stevens die and orders Goodwin to wipe Stevens’ memory for a future mission. Stevens convinces Goodwin to allow him one more trip back to the train so that he can try to save everyone, despite Rutledge’s insistence that events could not be altered.