The novel opens with Detective Layla Washington, a 60-something investigator with the Stevens County Sheriff's Office, monitoring a desperate rescue operation at the Devil's Staircase, a remote cave system in the Cascade Range. An unidentified young woman is trapped in a flooded crawlspace deep underground, pinned by rockfall and fading in and out of consciousness. A body with a fatal gunshot wound has been found outside the cave, and the trapped woman is a person of interest in the homicide. After an ominous update from the incident commander, Washington hopes the woman survives to explain what happened.
The story shifts to the previous morning. Tess DeWater, a 28-year-old law student and self-described anxious control freak, joins her best friend, Allie Merritt, for a caving trip to the Devil's Staircase. Allie is a successful travel influencer who runs a blog called Keep Calm. Adventurous and fearless, she was once clinically dead for 20 seconds after a snakebite in Mexico. Tess is cautious and introverted, marked by a large chemical burn scar down her back. Despite a decade-long friendship, Tess privately admits to jealousy and insecurity about their bond. During the drive, Allie hints at trouble with her boyfriend, Ethan Ramirez, a pediatric resident, but deflects Tess's questions.
At the cave entrance, the women encounter a man in all-black clothing and a reinforced balaclava who introduces himself as Jacob, claiming to work for a lumber company. He studies their gear, fixates on the GoPro cameras mounted to their helmets, and calls Tess "Babygirl." Allie tells him to leave them alone and leads Tess underground.
The narrative alternates between the cave descent and a present-day hospital interview, where Washington questions the injured Tess at Sacred Heart Medical Center. Tess tells her story as the sole survivor. She and Allie rappel a nine-story underground crevasse called the Great Wall, spot a red glow that Allie dismisses as a hallucination, and hear footsteps matching their pace in a tunnel with deceptive acoustics. Near the entrance to the Drainpipe, a long, cramped crawlspace, the red glow reappears, resolving into Jacob wearing a red headlamp. He blocks the tunnel and demands both women zip-tie their wrists. Allie refuses and counteroffers money. According to Tess, Jacob shoots Allie in the head, and Tess dives headfirst into the Drainpipe to escape.
Tess describes a harrowing chase through progressively tighter tunnels. She squeezes through a gap beneath a collapsed boulder too narrow for Jacob to pass, then discovers her GoPro has recorded the entire attack. When Jacob uses a scissor jack to widen the gap and resumes pursuit, Tess fakes being stuck and stabs at his face with a knife. She trades a blank spare memory card for a false truce, and when Jacob removes his balaclava, the camera captures his face. She fights him at the edge of a 40-foot vertical drop called the Chimney, using her climbing rope to entangle him. She drops into the pit below, recovers his fallen gun, and when Jacob leans over the edge to catch the GoPro she tosses upward, she fires the last bullet, striking his throat.
Washington shares her emerging theory. A bloody glove print on Jacob's Jeep, too small to be his, proves a second person was involved. She steers Tess toward suspecting Ethan, who served as their surface watch and knew exactly where both women would be. Washington reveals that Allie was under federal investigation for wire fraud and had recently purchased pregnancy tests, framing both details as evidence of relationship turmoil that could give Ethan motive. Tess cooperates with the detective's narrative.
The novel's second part shatters Tess's account. Told from Jacob's perspective, it reveals that three weeks before the trip, his girlfriend proposed he murder her best friend at an isolated location while she posed as a fellow victim. Jacob met the woman at a bar where he punched out a man who was harassing her. She promised him $30,000 to stage an ambush at the Devil's Staircase and planned every detail: the location, the disguise, the cover story.
When the ambush goes wrong because the target refuses to comply, Jacob fires but misses. The target flees into the Drainpipe with her helmet camera still recording. Everything Tess attributed to herself in the hospital was actually performed by Allie: the fighting, the tricks with the memory card, the final gunshot. When Ethan arrives at the cave searching for Allie, Jacob stabs him, and the girlfriend zip-ties the wounded man as a hostage. After Allie shoots Jacob in the throat from the bottom of the Chimney, he staggers to the surface. His girlfriend rips the bandage from his wound, ensuring he bleeds out. Jacob's dying narration reveals the full truth: Tess poured bleach on her own back as a teenager to frame her mother for abuse and escape into Allie's wealthier family. Her mother lost custody and eventually died by suicide. The woman Jacob calls "Babygirl" is Tess. Tess moves to start the Jeep and flood the cave with carbon monoxide, but Jacob laughs with his dying breaths. The GoPro's memory card is missing because Allie kept it.
The third part shifts to Allie's perspective. Trapped at the bottom of the Chimney, she swallows the memory card as insurance: Even if she dies, the footage will be found during an autopsy. She reflects on discovering her pregnancy in Costa Rica; she is five weeks along and has planned to terminate the pregnancy. When Tess descends the Chimney to confront her, the last corroded anchor bolt shatters, trapping both women in the lower chamber. Before they can fight, exhaust from Jacob's idling Jeep begins flooding the cave with carbon monoxide.
Allie identifies the only escape: Worse Than Death, a submerged maze of tunnels as narrow as 10 inches. Tess holds the only map, forcing a desperate codependency. Allie survives blind underwater plunges by swimming opposite to Tess's stated directions, correctly sensing deception. On the final dive, Tess holds the disintegrating map backward against her flashlight, reversing left and right. Allie swims the middle path and hits a dead end when the tunnel collapses, pinning her ankle. She recovers a last breath from air bubbles trapped against the ceiling, recalling Ethan's remark that exhaled air can be breathed more than once. She tries to dislocate her own ankle to free herself, channeling Ethan's words from their first date: "You'd be an amazing mother." Throughout her ordeal, she has been addressing her unborn child as "sesame seed," and she resolves to keep the baby. She loses consciousness before the outcome is shown.
Tess is arrested as she leaves the hospital. In the interrogation room, Washington lays out the true sequence: Tess arranged Allie's murder to conceal her embezzlement from Keep Calm, where she had been forging ad metrics and stealing from Allie's sponsors. Tess fabricated a survivor narrative attributing all of Allie's heroic actions to herself. Tess pushes back with her legal training, but Washington reveals her ace: Ethan survived. When Tess checked his body for a pulse, Ethan suppressed his heartbeat by pressing rocks against the arteries under his armpits. After Tess left the scene, Ethan dragged himself to Jacob's Jeep and used its citizens band radio to call for help, triggering the rescue operation from the prologue. Allie may still be alive with the memory card containing all the evidence. Tess, finally broken, requests a lawyer.
In the epilogue, Washington visits Ethan in post-surgical recovery. He wakes intubated and unable to speak. Washington tells him she has "something incredible to show you" and holds her phone to his face, displaying the incident commander's final text: "WE SAVED HER."