A man (Jake Gyllenhaal) awakes on a train to Chicago, sitting across from a woman (Michelle Monaghan) who seems to know him. Confused, the man explores the cabin, discovering to his astonishment that the face he sees in the mirror is not his own. As he tries to piece together what is going on, the train explodes.
Waking suspended in a sealed chamber, the man comes face-to-face with Air Force Captain Colleen Goodwin (Vera Farmiga) via a monitor and is told that he is in fact Colter Stevens, a helicopter pilot with the US army. Disorientated and distressed, Colter listens as his superior officer explains that, just hours ago, a bomb exploded on a Chicago train and a further, much larger, attack is expected on the city.
Utilising quantum physics through a process known as the Source Code, Goodwin and her colleagues are able to insert Colter into the moments leading up to the explosion.
Tasked with finding out who planted the bomb, Colter must relive the eight minutes before the explosion again and again, as he slowly pieces together not only the events leading up to the attack, but the startling truth behind his involvement in the mission.