Trevor Reznik (Christian Bale) is a machinist whose insomnia has led to him becoming emaciated. His appearance and behavior keep his coworkers away, and they eventually turn against him when he is involved in an accident which causes his coworker, Miller, to lose his left arm. Trevor, who was distracted by an unfamiliar co-worker named Ivan, is blamed for the accident. No one at the factory knows of Ivan and there are no records of him. Trevor seems to find comfort in the arms of Stevie, a prostitute with genuine affection for him, and with Maria, a waitress at an airport diner he frequents. He is haunted by brief flashes of recurring imagery, and things such as his car cigarette lighter take on a menacing air. A mysterious series of post-it notes appear on his refrigerator, depicting a game of hangman.
These vague incidents send him further into paranoia, but he nonetheless attempts to establish a relationship with Maria. Meeting her at an amusement park, Trevor goes with her son Nicholas on a fun house ride called “Route 666”. The ride, originally a harmless scare ride, begins to show increasingly disturbing images for Trevor as it advances, and its flashing lights cause Nicholas to suffer an epileptic seizure. No longer able to think clearly, Trevor suspects that the bizarre events are a concerted effort to drive him insane. These ideas are fed to him in small random clues. One of them is a picture of Ivan fishing with Trevor’s coworker Reynolds, which he discovers in Ivan’s wallet when Ivan leaves it unattended in a pub. Another near-accident at work causes Trevor to lash out in rage at his co-workers; as a result, he is immediately fired. Increasingly distracted and alienated, Trevor forgets to pay his utility bills and his electricity is disconnected. A dark, viscous liquid begins trickling out of the freezer, coating the refrigerator door with streaks of what appears to be blood.
After several attempts to confront Ivan, Trevor tries to trace his license plate. He follows Ivan’s car to read its license plate, but runs out of gas during the pursuit. When a DMV clerk insists that personal information cannot be released unless a crime has been committed, Trevor throws himself in front of a car in order to accuse Ivan of committing a hit and run. He files a police report with Ivan’s plate number on it, only to be baffled when he is told that the car in question is his own; he had reported the vehicle totaled one year ago. He flees from the suspicious policemen and goes to Stevie, who clothes and washes him, but he finds the photo of Ivan and Reynolds framed in her home and accuses her of conspiring against him. Confused, Stevie says the picture is of Reynolds and Trevor, but he refuses to look at it and is thrown out after a verbal conflict. He goes to the airport diner, but is told by an unfamiliar waitress they’ve never had an employee named Maria. The waitress at the counter tells Trevor she has served him every day for a year, and in all that time he spoke so little that she began to think he was a mute.
Trevor sees Ivan take Nicholas into Trevor’s apartment and, fearing the worst, sneaks inside. Nicholas is nowhere to be seen and doesn’t respond to Trevor’s calls. He confronts Ivan in the bathroom and kills him after a struggle. He pulls back the shower curtain, only to find the bathtub empty. He goes to the refrigerator and opens it to find rotting fish and other spoiled food tumble out. His mind then flashes back to the fishing photo, which actually shows a healthy Trevor with Reynolds, just as Stevie claimed, and Trevor hallucinating Ivan in it. The scene returns to one which occurred during the opening credits, in which he tries to dispose of someone’s corpse, presumably Ivan’s, by rolling it in a rug and casting it into the ocean. When the rug unravels, there is nothing inside. Ivan, alive as ever, appears holding a flashlight and laughs.
Trevor stares into a mirror at home, repeating the words, “I know who you are.” It is revealed that one year prior, a healthy looking Trevor ran over and killed a boy identical to Nicholas after taking his eyes off the road to use the car’s cigarette lighter, which was witnessed by the boy’s mother, identical to Maria. He decided to drive away, and the resulting guilt became the deep-seated cause of his insomnia, emaciation and repressed memory. Ivan was a figment of Trevor’s imagination and a manifestation of himself before the accident. He fills the missing letters of the hangman note to spell “killer.” He briefly considers going to the airport and escaping, but instead drives to police headquarters, signifying his “road to salvation,” a recurring theme in the film. He is accompanied by a silent but encouraging Ivan, who bids him an approving farewell outside the station. At the police station’s front desk, he confesses to the hit and run. Two police officers escort Trevor to a cell, where he states he wishes to sleep and does so for the first time in a year.