The film opens with Adrien Brody as an active soldier in the Gulf War in 1991. His voiceover tells us he was 27 the first time he died. While on duty, a young boy ambushes him and he is shot in the head.
We move forward a year and he is clearly a loner. We see him hitch-hiking along a snowy road. He encounters a broken-down pick up truck with a young mother (Kelly Lynch), clearly under of the influence of drugs and/or alcohol, and a young girl, about eight or ten years old.
The mother is too strung out to know what's going on, stumbling around in the snow near the truck intermittently vomiting.
The girl meanwhile, is happy to talk to Brody, who offers to try to fix the truck. The girl sees his army dog tags attached to his bag and asks what they are. He says they're dog tags with his name on them, so he won't get lost. The girl asks can she have them and he gives them to her.
After tinkering around with the engine, he asks the girl to try the ignition and the truck starts. At this point, the mother comes to, and, in her stoned reverie, becomes enraged, deciding that Brody is some kind of pervert, despite the girls protestations that he fixed the truck. She bundles the girl into the car and they drive off.
Brody continues to walk, and is later picked up by a man in a car some miles from the Canadian border.
After a few minutes of driving, the car is pulled over by a policeman. We don't see what happens at this point in the narrative, but next thing we know, Brody is on trial for the murder of the cop, and cannot remember anything from the day in question apart from the mother and the young girl, who the authorities have been unable to trace.
Brody is found guilty but insane and sent to an asylum run by Kris Kristofferson.
Jennifer Jason Leigh also works in the asylum. We later see that she is attempting to offer occupational therapy for the disabled son of a friend, but her success is minimal. This takes place in her home, and is not information Brody is privy to.
One night, Brody is pumped full of drugs by the staff, placed in a straight jacket and put in a mortuary drawer. Here, he experiences several, rapid-cut flash backs to his past, including the war and the incident with the policeman, but not enough to assist piecing together what happened.
The next time they try to put him in the drawer, he feigns acquiescence to lull the staff into a false sense of his co-operation, but then assaults Kristofferson, striking him in the face and injuring his cheek.
In his next session, he finds himself transported to outside a diner late on Christmas Eve. Keira Knightley leaves work in the diner, pulls up and offers him a lift, explaining that he won't get a cab on Christmas Eve standing there.
She takes him home and it is apparent that she drinks heavily and lives an isolated life. While she takes a bath, Brody rummages around in the fridge and ends up making them some toasted sandwiches.
Knightley tells Brody that her mother died some years before, having passed out with a cigarette in her hand and subsequently burned to death.
Looking around her place, Brody discovers his dog tags and asks her how she got them. Knightley becomes concerned when Brody tries to explain that they are his. Up to this point, we have no idea what year we are in, but a cursory glance at some bank statements reveals that Brody is now in 2007.
Unable to explain to himself how this has happened, but completely convinced that he has somehow shot forward in time and met the grown-up girl, Brody tries to explain to Knightley who he is.
Attempting to convince her by giving details about the day he met her and her mother with the pick-up truck (information which, as he says, there's no way he could know by just looking at the dog tags), an incredulous Knightley is adamant that he can't be who he claims to be, as he died on January 1st, 1993 as a result of a head wound, although she has no further information on this.
Already emotionally unstable, Knightley becomes hysterical and demands he leave.
Brody does so, and wakes up, back in the drawer in 1992.
Brody now needs to get into the drawer on a nightly basis, in order to piece together what's going to happen to him on January 1st, six days away.
Returning to 2007, Knightley now believes him, and agrees to help him. Brody needs to find out what happened to him, so (in order to explain the uncanny similarity to his own self from fifteen years earlier) he poses as his own nephew, and visits Jennifer Jason Leigh with Knightley.
During this visit, he learns of her use of electro-shock therapy on the boy she looked after, but they learn nothing of the circumstances in which he died.
While at the hospital, Brody encounters a patient who had been an orderly there when he was undergoing the jacket/mortuary drawer treatment, and who is now suffering from dementia.
Knightley and Brody have sex, but Knightley wakes up alone the next morning, Brody having been sucked back to 1992 by his removal from the drawer.
During one of his episodes in the drawer, we see what happened the day the policeman was killed. Pulled over by the cop, the driver of the car shoots him. Brody gets out of the car, incredulous. As the cop slumps back in the snow, he fires a shot which strikes Brody by accident. The driver continues to fire at the cop, killing him. He then wipes his gun clean and throws it into the snow near the now unconscious Brody, before driving away. Brody is incriminated and sent to the asylum.
On his next visit to the future, Brody confronts Kristofferson, now an old man, convinced that he knows what became of him on January 1st, 1993, but Kristofferson cannot help.
Brody asks Knightley what her address was in 1992, i.e. when he met her as a child on the roadside, and she tells him. Driving away, Brody disappears from the back seat of Knightley's car and returns to 1992.
Back in 1992, Brody manages to convince Jennifer Jason Leigh that he has seen the future by telling her that she told him she used electro-therapy on the young boy. She doesn't believe him, as she says that such practices would not be used on so young a patient, but he says that she will eventually come to realise that this is the only way to help the boy. Brody explains that the boy is effectively in a constant fit, and that Leigh just hasn't realised this yet.
Due to her lack of success with the boy up to this point, she takes a chance on Brody's assertion as to the electro-therapy. She applies a very low-frequency, short burst to the boy, which has instant success.
Now that she believes Brody, she agrees to his request to deliver a letter to Kelly Lynch. Leigh smuggles him out of the asylum to drive him out to Keira Knightley's childhood home (i.e. where she lived in 1992/1993).
Arriving at the house, the girl recognises him from the day he fixed the truck. He asks to speak to her mother.
Having already learned that Kelly Lynch will pass out one day with a cigarette in her hand, and burn to death from the resulting fire, Brody gives her a letter warning her of this.
Returning to the asylum with Jennifer Jason Leigh that evening, Brody slips on ice and hits his head, causing his fatal head wound. Asylum staff place him into the drawer before he dies, allowing him to return to 2007.
As he is standing outside the diner, Knightley pulls up in a VW Beetle and offers him a lift (we assume that she recognises him, although in the altered future he would not have explained to her how he is to be there, completely unaged 14 years from the last time they met (all the previous experiences never happened for Knightley after Brody handed her mother the letter)). As they are driving away, Knightley's mother calls her on the phone. In this altered future, having (we assume) been convinced by Brody to believe the contents of the letter, Lynch (presumably) has cleaned up her act, so that in the improved 2007, she is still alive and it is apparent that she has a strong relationship with her (no longer dysfunctional) daughter.
Knightley asks Brody "how long do we have?", and they drive off together to the strains of "We Have All The Time In The World".