On Tuesday, Mardi Gras in New Orleans, ferry Sen. Alvin T. Stumpf is carrying hundreds of U.S. Navy sailors and their families from the Algiers dock to a celebration, when it explodes and sinks into the river, killing at least 543 on board. Special Agent Doug Carlin (Denzel Washington) from the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives is sent to investigate the explosion and discovers evidence that the attack was committed by a domestic terrorist. On arrival at the scene he hears the song "Don't Worry Baby" by the Beach Boys on the radio. After surveilling the wreckage he calls his vacationing partner, Larry Minuti, with whom he had been having disputes, and simultaneously hears a ring tone; the ringing is coming from a body bag nearby. Doug leaves a message then hangs up. He then meets with the investigating police officers and U.S. Federal Bureau of Investigation Special Agent Paul Pryzwarra (Val Kilmer), and informs them of his findings.
At the station, a clerk gives him the number of a woman with a "sexy voice" that had called earlier asking for him, a number that he proceeded to write down on a gum wrapper. Doug then learns about a charred body pulled from the river, that of a Claire Kuchever (Paula Patton). However, unlike the other bodies found in the river, this one was discovered to have been killed before the explosion. Claire appears to be in her early thirties, and has several fingers missing, (seemingly having been torn off), is wearing a floral red striped dress and half of her body is burned. Doug calls back the woman whose number was on the gum wrapper, but the woman doesn't pick up and he is forced to leave a message. Traveling to Claire's house to investigate, he finds the phrase "U can save her" written out in magnet letters on her refrigerator next to an ad for a used SUV. Further searching her house, he finds a loaded revolver on a shelf, and while listening to the missed calls on her answering machine, he hears missed calls from her concerned friend Beth and from her father, and finally, he hears the message that he had left himself a few hours beforehand at the ATF office, realizing that Claire was the woman who had tried to call him earlier.
Doug brings his findings to Special Agent Pryzwarra, concluding that the terrorist had gone to Claire's house because he needed her truck to store the explosives for the bombing, then had to kill her to tie up any loose ends, burning her and dumping her in the river to make her look like another victim of the ferry bombing. Doug also learns that his partner Larry Minuti, who he thought had been on vacation, was actually killed in the ferry bombing. Nonetheless, Pryzwarra is impressed with Doug's detective expertise, and convinces him to join a newly formed government-funded detective unit whose first case is to investigate the explosion. With a team led by scientist Dr. Alexander Denny (Adam Goldberg), they investigate the events leading up to the explosion by using a new program called "Snow White", which enables them to look into the past (4 days, 6 hours, 3 minutes, 45 seconds, 14.5 nanoseconds) in detail. The system is limited in that they can only see past events once; there is no fast forwarding or rewinding, although they can record what they see. Convinced that Claire is a vital link to the case, Doug persuades the team to focus on her. Doug receives a call from his ATF office, telling him that the investigation team found bloody clothes in the trash at Claire's house, and is told that he did a very lousy job at investigating the house, for the house is covered with his fingerprints. While investigating Claire's past through "Snow White", the bomber calls her to try and purchase her car, a red SUV, to use to blow up the ferry. Although he decides not to purchase her car, during the phone call the "Snow White" team is able to discover an exact time that they know when the terrorist will be at the ferry dock.
Doug eventually discovers "Snow White" is actually a time window, and is also capable of sending inanimate objects into the past. Despite Denny's protests against tampering with the past, Doug has the team send a note back in time to inform his past self of the time and place to meet and stop the ferry bomber. The team sends the note back to the very last moment Doug and his partner Larry Minuti were arguing prior to his trip. To the team's dismay, past Doug leaves the room before seeing the note and Larry sees it first. Larry checks up on the lead and while confronting the terrorist on the dock, is shot through the car door of the terrorist's black SUV. The team attempt to follow the terrorist, who takes Minuti with him, but he goes out of range of "Snow White", Doug then follows him in the present time using a "Snow White" like helmet that increases the range. Doug follows the terrorist to his home, a large abandoned and destroyed shack on the Louisiana riverfront where Doug notices a crashed ambulance and several destroyed buildings, where the "Snow White" team watches the terrorist kill Minuti in the past, before the shack was destroyed.
Using face recognition technology, the "Snow White" team manage to identify and take into custody the ferry bomber, who is revealed to be disillusioned self-proclaimed patriot Carroll Oerstadt (James Caviezel). It turns out that Oerstadt was angry at the U.S. government after being turned down for enlistment by the Marine Corps and Army, who believed Oerstadt was overcommitted and psychologically unstable. During questioning, Oerstadt tells Doug that he only needed Claire's truck for the bombing because his own truck had bullet holes in it after the confrontation with Minuti on the ferry dock. After a lengthy political and philosophical conversation with Oerstadt about the bombing and his belief in destiny, Oerstadt admits to committing the crime, which satisfies Pryzwarra. Convinced that the case is now closed, the government shuts down the "Snow White" unit's investigation. However, Doug is deeply troubled by the realization that he himself had caused the deaths of Minuti and Claire by altering history and sending the note back in time to Minuti. Doug convinces Denny to do one last unauthorized experiment: send Doug to the past to save Claire and stop the ferry bombing. The procedure is risky, as until then no human had been sent through, and doing so could mean death to the time traveler.
The trip through time stops Doug's heart, and upon arriving at a hospital four days in the past, he is revived after he is found in a hospital in the past. After stealing clothes from another patient, he travels in a stolen ambulance to Oerstadt's home, crashing into the side of the shack just as Oerstadt is about to remove Claire's fingers and burn her. Oerstadt drives away after he blows up the house with gas, and Carlin escapes with Claire in Oerstadt's SUV and makes a stop at Claire's apartment so Doug can tend to his wounds. When they arrive he asks for specific items, mentioning clothes in her closet and belonged to her ex-boyfriend he thought he could wear. He throws his bloody clothes in the sink and writes the phrase that he had seen earlier with the magnets on her refrigerator. After she returns from getting changed, Doug notices she is wearing the red striped dress she was found dead in after the bombing, and suggests she wear something else. She pulls a gun on him, suspicious because he knew where she lived and knew all about her, and suggests that he is the terrorist himself. She calls his agency to find his true identity, and the clerk at the ATF agent accurately describes him but says that he isn't available. She drops the gun, placing on the shelf where Doug would find it in the future, and willingly goes to help him. The clerk at the ATF who took her call writes down her number on a gum wrapper.
After Claire treats his wounds, Doug goes to the ferry dock and waits for the right moment to board the ferry and attempt to disarm the bomb, convincing Claire to come with him, where she will be safe. At the dock, he asks Claire to stay behind and alert security of a possible threat, but after Oerstadt finds his own SUV parked outside, he runs back to the ferry, thinking that Claire is following him. While the US Navy band plays "When the Saints Go Marching In", Claire jumps onto the ferry hoping to warn Doug, who is searching for her vehicle, but is caught by Oerstadt and tied up in her car, which is carrying the explosives. A suspicious security guard who confronts Oerstadt is shot and killed, resulting in a standoff between the ferry's security force, Doug, and Oerstadt. Doug recites key parts of the conversation that he had with Oerstadt earlier, in the future, and manages to distract him so that Claire could hit him with her car. Doug shoots Oerstadt in the head, killing him and then rushes to the SUV to untie Claire, but is then held at gunpoint by the security force. To save everyone on the ferry, Doug and Claire drive the SUV with the bomb off the ferry into the water just before it explodes. Claire is able to escape, but Doug is unable to get out before the bomb explodes and dies in the underwater explosion. As Claire mourns Doug's death, she is approached by another Doug Carlin, the one from the present, who consoles her. As they drive off, the Beach Boys' song "Don't Worry Baby", which had played at the beginning of the film and at the end before they drive the car off the boat, plays again on the radio.