A convict named Malcolm Rivers awaits execution for several vicious murders that took place at an apartment building. Journals belonging to Malcolm are discovered mis-filed in the case evidence, not introduced during the trial. Malcolm's psychiatrist, Dr. Malick, and his defense attorney argue that the evidence was intentionally suppressed by the prosecution and move to stay Rivers' execution, contending that Malcolm is legally insane. With this late evidence brought forth, a midnight hearing takes place, to determine if the journal is adequate evidence to grant their motion.
Meanwhile, ten strangers find themselves stranded in the middle of a torrential rainstorm at a remote Nevada motel, run by Larry Washington. The group consists of an ex-cop, now limousine driver, Ed Dakota; Caroline Suzanne, a washed-up, irritable actress; Officer Rhodes, who is transporting convicted murderer Robert Maine; Paris Nevada, a prostitute; newlyweds Lou and Ginny Isiana; and the York family, George, Alice and their nine-year-old son, Timmy, who is in crisis because Alice has been struck by Ed's car.
With both ends of the road completely flooded, the group is forced to spend the night at the motel. Rhodes handcuffs Maine to a toilet in his room to prevent him from moving about freely. As everyone is settling down for the night, Suzanne is attacked by an unknown assailant after she leaves her room looking for a cell phone signal. Ed hears a loud banging noise outside as he's laying in bed, venturing outside and discovering Suzanne's head in a dryer, along with the number 10 motel key. Maine is suspected to be the killer, who is found to have escaped his captivity.
Ed alerts the others about Suzanne's death and Maine's escape. Lou and Ginny get into a fight, leading them back to their motel room. Ginny locks herself in the bathroom as they argue through the door, but Lou later starts banging in a frantic manner and goes quiet. Ginny slowly unlocks the door only to see a silhouette approaching with a knife. As she screams and retreats to the bathroom again, she jumps out of the window and the other guests find Lou's corpse in the corner of the room, stabbed to death.
At the hearing, the contents of Malcolm's diaries are revealed, indicating Malcolm suffers from an extreme case of dissociative identity disorder, harboring eleven distinct personalities. His journal contains entries written by his different personalities, each with distinct handwriting and prose, as if they were the personal thoughts of several different people. His defense attorney argues that Malcolm is completely unaware of the crimes for which he is being executed, which is in violation of existing Supreme Court rulings on capital punishment. Dr. Malick is introducing the concept of integrating the personalities of someone with dissociative identity disorder, when Malcolm arrives, strapped into a wheelchair.
While taking photos of Lou's crime scene and talking with Paris, Ed finds the number 9 key in Lou's bloody hands. He begins to suspect that the killer is counting down and targeting them in order. Meanwhile, Maine is making his escape over the wet terrain, but strangely finds himself right back at the motel, having gone full circle. Rhodes spots Maine trying to hide; he and Ed subdue Maine in a brief struggle. They tie Maine to a pole and Larry is appointed to guard him, but Larry is later seen away from his post. Maine is discovered to have been killed with Larry's own baseball bat, with the weapon sticking out of the corpse's mouth in a grisly manner. Rhodes and Ed find the number 8 key next to Maine's body, and harass Larry, who grabs Paris and threatens to cut her if they continue to accuse him. Paris wrestles him off and the freezer is opened accidentally to reveal the frozen body of the real motel manager; Larry runs away and attempts to escape in his truck, but he accidentally crushes George against a dumpster as he tries to save Timmy from being run over.
Rhodes binds Larry with rope to a chair, and tells the other guests that they're going to stay together until dawn, or he'll shoot the next suspect. Larry tearfully tells them the story of how he came upon the dead body of the manager and started running the motel for him, convincing Paris and Ed that he's not the perpetrator. Alice, still in bed, is checked on and presumably has died from her injuries, but Rhodes finds the number 6 key. George's body is recovered from the front of Larry's truck and the number 7 key is found in his pocket, which confuses the others.
Ed tells Ginny and Timmy to flee in a car near the edge of the motel, but it explodes, leaving no trace of the two behind. The last four survivors discover that the bodies of all the previous victims have disappeared. Paris, yelling in hysterics at their unknown assailant, says that her birthday is the next week; it transpires that all eleven people were born on May 10 — which is also Malcolm's birthday, and the day he committed the murders.
Ed leaves the other three and checks their ID cards in the office, discovering that each one of them is named after a state, and that their birthdays all do indeed match. Ed begins to hear a voice call out to him, and as he listens he finds himself in a different building, strapped to a chair, with Dr. Malick calling out to him. Ed finds he is at the meeting to argue and postpone Malcolm's execution, but is confused as to why he's being told of the crimes and Malcolm Rivers' past. Dr. Malick explains that he is in fact one of the personalities that Malcolm Rivers created as a child to cope with the abandonment and abuse he was subjected to. Informed that one of the personalities is the homicidal template that went on a killing spree, Ed is instructed to "go back" to the motel to try to eliminate this identity.
Ed 'awakens' to find himself standing in the rain, looking at the motel from a distance. Paris finds convict-transportation files for both Maine and Rhodes in the police car. A flashback reveals that Rhodes killed the correctional officer transporting him and Maine, put the officer's body in the trunk, and then assumed his identity. Rhodes attacks Paris, but she is saved by Larry, who is subsequently shot to death by Rhodes. Finally believing Rhodes to be the murderous personality, Ed goes after him and the two men end up shooting each other fatally, leaving only Paris still alive.
When Malick demonstrates that the homicidal personality is dead, Malcolm's execution is stayed and it is determined that he should be placed in a mental institution under Malick's care. In Malcolm's mind, Paris has driven back to her hometown in Frostproof, Florida. As she tends to some soil in her orange grove, she shakily discovers the number 1 key buried in the dirt, and finds Timmy behind her. Flashbacks reveal that Timmy orchestrated all of the deaths at the motel, and made it appear that he had been killed with Ginny. Timmy kills Paris, while Malcolm strangles Malick, causing the van that is en route to the mental institution to swerve off the road and stop before Timmy's voice repeats the poem "Antigonish" by William Hughes Mearns one more time, now the sole personality of Malcolm Rivers.
John Cusack as Edward "Ed" Dakota,
Ray Liotta as Samuel Rhodes,
Amanda Peet as Paris Nevada,
John Hawkes as Larry Washington,
Clea DuVall as Ginny Virginia,
William Lee Scott as Lou Isiana,
Rebecca De Mornay as Caroline Suzanne,
Leila Kenzle as Alice York,
John C. McGinley as George York,
Bret Loehr as Timothy "Timmy" York,
Jake Busey as Robert Maine,
Pruitt Taylor Vince as Malcolm Rivers,
Alfred Molina as Dr. Malick,
Holmes Osborne as Judge Taylor
Frederick Coffin as Detective Varole
Carmen Argenziano as Defense Lawyer and Attorney
Matt Letscher as Assistant District Attorney
Marshall Bell as District Attorney
Loosely based from the story structure of Agatha Christie's 1939 whodunit And Then There Were None,