Malcolm Rivers (Pruitt Taylor Vince) is a psychotic killer awaiting execution for several vicious murders. His psychiatrist, Doctor Malick (Alfred Molina), has discovered a journal belonging to Rivers that may explain why he really committed the murders. With this late evidence brought forth, a new hearing takes place on a stormy night in which Malick will try to persuade the Judge to spare Rivers.
Meanwhile, a group of ten strangers, through a number of circumstances, find themselves stranded in the middle of a storm in a remote motel in the Nevada desert. With the phone lines down due to the storm, the group prepare to spend the night, taking care of those that have been injured through their arrival. However, the group quickly finds that there is an unknown murderer present, killing off each of the guests and leaving behind one of the motel's room keys to be found, starting with Room 10's key and counting down.
Back at the hearing, the contents of Malcolm's journal are revealed, indicating the prisoner suffers from an extreme case of Dissociative Identity Disorder, harboring ten distinct personalities. Malick is able to bring forth one of Malcolm's personalities, Ed (John Cusack), revealing that events at the motel are occurring inside Malcolm's mind, each personality being a distinct person though all sharing the same birth date. After hearing of events in the motel, Malick informs the Ed personality that he must find and eliminate the hostile personality in order to prevent Malcolm from being executed lest all the personalities be killed off.
In the motel setting, as the group is dwindled down, Ed believes that the personality of Rhodes (Ray Liotta) is the murderer, and sacrifices himself to kill Rhodes, leaving only Paris (Amanda Peet) alive.
When Malick demonstrates that that homicidal personality is dead, the judge decides to place Malcolm in a mental institution under Malick's care.
As Malcolm is driven along with Malick to the institution, in Malcolm's mind, Paris has driven away from the motel to her hometown in Florida. As she tends an orange grove, she discovers the Room 1 motel key in the ground, and turns around to find the young boy Timmy standing behind her. Timmy, the true homicidal personality, had orchestrated all the deaths at the motel, and made it appear that he had been killed as well; he finishes his task by killing Paris, reciting Hughes Mearns's Antigonish.
Now driven only by his last personality of Timmy, Malcolm strangles Malick, and the transport van runs off the side of the road.