The novel opens with a prologue in which Barsidious White, a serial killer, surveys the decayed foyer of an abandoned house, noting evidence of death in its basement and anticipating his next deadly game.
Jack Singleton, a novelist, and his estranged wife Stephanie, a country singer, drive through rural Alabama toward a marriage counseling appointment in Montgomery. Their relationship has deteriorated since the death of their toddler daughter, Melissa, and Stephanie wants a divorce. On the highway, an aggressive patrolman named Morton Lawdale tailgates them before speeding off. When Jack takes a wrong turn, they encounter Lawdale again at a road closure, and he directs them down a gravel detour with a warning not to get caught after dark in the backwoods.
The Mustang hits a spike trap that shreds all four tires. Jack and Stephanie walk to the Wayside Inn, a stately old house incongruously maintained in the remote forest. Inside, they meet Randy Messarue, a wealthy hotel chain CEO, and Leslie Taylor, a psychology professor and Randy's companion, whose car was also spiked from the opposite direction. No phone service is available.
The inn's owners appear. Betty, the domineering matriarch, puts the guests to work preparing dinner. Her husband Stewart, a large, scarred man, menaces Randy. Their adult son Pete, who displays signs of intellectual disability, fixates on Leslie, declaring he wants her as his wife. Dinner turns grotesque: the food crawls with worms, and the hosts harass and intimidate their guests relentlessly.
When Stephanie tries to flee, she and Jack see an enormous figure on the front walk: a man in a long coat, wide-brimmed hat, and steel mask, carrying a shotgun. The figure seals the exits from outside and later drives a pickup truck through the front wall to block the entrance. A tin can drops down the chimney bearing a message from the killer, whom the innkeepers call White. His rules state that he killed God, that he will kill anyone who enters, and that he might spare them if they provide one dead body by dawn.
Stewart seizes the shotgun and turns on the guests, forcing them into the meat locker and demanding they choose one to die. Jack distracts Stewart by pretending to volunteer, then grabs the shotgun while Randy tackles Stewart from behind. After a violent brawl, Jack and Randy lock Stewart and Betty inside.
The group fractures as they descend into the basement, an impossibly vast maze of concrete halls and locked doors far larger than the house above. Jack and Randy discover rooms that defy normal architecture, including a study with a pentagram and a mirror that does not reflect their images. A mysterious force pulls Jack into a sealed tunnel, separating him from Randy.
Leslie, fleeing Pete, ends up in his underground room, a decorated space that triggers déjà vu connected to her childhood experience of abuse. Pete captures her and straps her to a spinning dartboard when she refuses to comply. Meanwhile, Stephanie hides upstairs, consumed by guilt over Melissa's death: She had posed the toddler on what she believed was snow but was actually thin ice on a pond, and Melissa fell through and drowned.
In the tunnel, Jack discovers Susan, a girl of about thirteen in a tattered white dress who has been hiding in the basement for three days. She tells him the house is "haunted" (144) and agrees to lead him to Leslie. Jack feels a powerful connection to Susan, who reminds him of Melissa. Susan guides Jack through a crawl space to Pete's room, where he attacks Pete and frees Leslie. They escape through an air shaft.
In the tunnels, Stewart chases Randy into a concrete tank that floods with rainwater. Stewart becomes stuck in a pipe and drowns. Randy notices black smoke seeping from the body, a recurring supernatural phenomenon, and hears White's voice demanding one dead body.
The four guests reunite in a boiler room. Every escape attempt fails: Doors they blast through loop them back to the same room. A message appears on the walls: "The Wages of Sin Is One Dead Body" (231). The house escalates its assault as exact duplicates of all four guests appear, creating a paranoid standoff. A massive column of corrosive black fog erupts, and when it clears, only one of each person remains.
Officer Lawdale enters the boiler room, heavily armed and claiming to have tracked the abandoned cars. He proposes circling to the main floor to open the basement door from above. At the appointed time, Susan redirects the group through the basement, where they encounter White advancing behind them. They escape upstairs, only to find the main floor decayed into a dusty ruin with every exit sealed.
Lawdale grows agitated and suggests someone must die so the rest can survive. Susan appears holding White's tin mask and reveals that Lawdale is the killer: White murdered the real patrolman and impersonated him from the start. Jack notices black smoke leaking from Lawdale's wound, confirming Susan's claim, and pulls the trigger, but the gun is empty. White's black, pupilless eyes are revealed, and he dons his mask once more.
White corners all five of them upstairs, tapes Susan's mouth shut, and ties her hands. He announces the house will burn at 6:17 AM and gives them six minutes to kill Susan or face slaughter.
Susan leads Jack and Stephanie into the basement, while Leslie hesitates on the stairs and Randy remains behind. Jack realizes the house draws power from the evil in its occupants' hearts: The distorted portraits reflect each person's inner darkness, and the doppelgängers are manifestations of their sin. He and Stephanie reconcile in a moment of genuine love and regret. Meanwhile, Randy stabs Leslie to death at White's command and joins the house's dark inhabitants.
White enters with an army of masked doppelgängers and demands that Jack kill Susan. Randy appears among them wearing a tin mask, and White shoots him dead. Jack refuses to kill Susan. White, losing control for the first time, shoots Susan. She dies in Jack's arms.
Susan's blood crackles with white light on the floor. Jack recalls her words about looking to the light and understands that Susan, the one guiltless person, has taken their death upon herself in a Christ-like sacrifice. Jack and Stephanie cry out for mercy. Light surges from Susan's blood, disintegrating every doppelgänger and striking White with devastating force. A blinding flash blasts through the house at exactly 6:17 AM.
Jack and Stephanie awaken to find three bodies in the basement: Randy, Leslie, and White. Police arrive after finding the abandoned cars. Susan walks out of the tree line, alive and smiling, her white dress stained with blood. She tells them that light came into the darkness and implies she may be more than an ordinary girl. She warns that White is "not finished" (371): Faint figures of Stewart, Betty, and Pete linger in the attic window. Stephanie shouts at them and they vanish, demonstrating the power the couple now carries. Susan disappears, leaving Jack and Stephanie to reckon with the aftermath.