The novel alternates between two timelines and perspectives. In the present-day storyline, set over a single Wednesday in early November, Liv Reese wakes disoriented in a cab in the middle of the night with no memory of how she got there. Her last clear memory is of answering her desk phone on a sunny summer day. She arrives at the Brooklyn brownstone she shares with her roommate, Dr. Amy Decker, only to find strangers living in her apartment and fall foliage outside, though she believes it is midsummer. She has no keys or purse but finds a wad of cash in her pocket and, wrapped in a T-shirt, a stainless steel knife streaked with fresh blood. She discards the knife in a trash can and notices writing on her hands, including STAY AWAKE across her knuckles and the address of a bar called Nocturnal on her wrist.
At Nocturnal, a bartender greets Liv by name and tells her she is a regular who avoids sleep because she fears what happens when she sleeps. A parallel storyline introduces Detective Darcy Halliday, an ex-military veteran on temporary transfer to the NYPD homicide unit, who arrives at a crime scene at a short-stay rental on East Fifty-Third Street. A dead man lies in bed, stabbed once under his rib cage with no signs of struggle. Halliday finds a strand of dark hair on the pillow, a half-empty wine bottle, and Post-it notes reading STAY AWAKE and DON'T OPEN THE DOOR. A message written in blood on the window reads WAKE UP! when viewed from outside. Detective Jack Lavelle, a veteran with 15 years' experience, is assigned as her partner.
Liv wakes again on a park bench, discovers her café has closed and her hairdresser has moved, and barely recognizes her own gaunt, long-haired reflection. At the Cultura Magazine office where she once worked as a senior staff writer, strangers treat her like a celebrity returning from London, a place she has no memory of living. She searches the date online and learns two years have passed. On the office television, the WAKE UP! message on the apartment window matches the one on her wrist. A man with a muffled voice calls the office, demanding to know where she put "the knife" and threatening to come find her. Liv flees.
Interspersed flashback chapters reveal the life Liv has forgotten. She was dating Marco Reggio, an Italian-born tech entrepreneur, and living with Amy, a doctor. At Cultura, Liv's scathing review of artist Milo Zee contributed to his public downfall. Separately, a mysterious guerrilla artist known as Q invited Liv to a disturbing exhibition featuring a bound woman and violent films. Amy, meanwhile, had been dating Brett Graham, a cardiothoracic surgeon. Around this time, Liv began experiencing stalking: someone followed her home, left milk in her fridge, and returned her dry cleaning while she slept. Anonymous messages referenced intimate details of her routine. When she reported the incidents, Detective Jerry Krause dismissed her, though his partner, Detective Larry Regan, took them more seriously.
Halliday's investigation uncovers that fingerprints on the wine bottle belong to Liv, listed in the FBI database as a crime victim from a case over two years old. An Interpol alert reveals Liv disappeared from London weeks earlier, and her social worker explains her condition: Every time Liv falls asleep, she wakes with no memory of the past two years. She has been taught to write reminders on her hands and keep a journal as a surrogate memory.
Liv discovers a grim basement apartment in her name filled with caffeine pills, energy drinks, and paranoid messages on the walls, including "He's coming for me." In the kitchen sink lie the charred remnants of a journal. The same muffled-voiced man calls, accuses her of murder, and approaches the apartment. She escapes through the kitchen window.
The victim is identified as Ted Cole, a British executive at Cultura. His fiancée, Elisabeth, tells the detectives that Ted rented the apartment as a safe house for Liv, believing the person who tried to kill her two years ago was coming back. She provides a sketch of a dotted fleur-de-lis, a stylized lily emblem, that Ted was investigating before his death. The wine is confirmed to have been spiked with sedatives.
The flashback timeline reaches its climax. Liv rushed home after a distraught call from Amy and found Amy and Marco in bed together, both stabbed to death. A man grabbed Liv from behind, forced a knife into her hand, and plunged the blade into her torso. Collapsing, she glimpsed his blood-colored shoes with a distinctive dotted pattern near the toes. She dragged Amy's phone down and dialed 911; the dispatcher urged her to "stay awake" as she faded in and out of consciousness, staring at Amy's pink kimono on the bedroom door.
At the Brooklyn precinct, Regan shares the old case files with Halliday and Lavelle. A forensic expert determined Liv's wound could not have been self-inflicted: She is left-handed, but the wound came from a right-handed attacker. The detectives track down Joe Chalmers, who confesses he was hired to stalk Liv but refused when asked to murder Amy and her lover.
Back in the present, a neurologist diagnoses Liv with a repetitive dissociative fugue, a rare form of amnesia triggered by trauma, and warns that her self-induced insomnia is worsening the cycle. At Cultura, Liv learns Ted has been murdered and sees CCTV footage identifying her as the suspect. She escapes through a fire exit. Meanwhile, CIA handwriting analysis reveals the WAKE UP! message was written by a right-hander too tall to be Liv, contradicting the case against her, but Lavelle remains focused on pursuing an arrest.
Liv falls asleep at Penn Station and wakes without memory, but a phone number on her palm leads her back to Nocturnal, where the bartender returns her lost phone. Ted's final texts reveal he believed he had identified Amy and Marco's killer. Outside the bar, Liv collides with Brett. Walking to his car, she notices his custom shoes bear the same dotted fleur-de-lis pattern from Ted's sketch. A flashback strikes: She remembers those shoes walking away from her as she lay bleeding on the floor. She realizes Brett killed Amy and Marco.
Feigning sleep in the car, Liv texts her GPS location and a plea for help to Halliday. Brett drives to an abandoned warehouse in Queens and searches for Liv with a gun. He confesses aloud: He murdered Ted by sedating and stabbing him, wrote the WAKE UP! message to frame Liv, and staged the scene to implicate her in all three murders.
Halliday arrives alone, finds Liv hiding under a desk, and orders her to stay down. When Brett raises his gun, Halliday fires twice, disarming him with one shot and wounding his shoulder with the other. She handcuffs him and calls for backup.
The next day, evidence mounts: Black paint chips from the crime scene match paint under Brett's fingernails and at Liv's apartment, linking him to the tampering and destruction of evidence there. His unique shoes connect him to the original murders. At the hospital, Liv wakes remembering everything from the previous night, a sign her condition is improving. Her doctors say proper sleep should prevent future episodes, though the lost two years may never return. Halliday tells Liv she will not be charged and that Brett will be prosecuted for Ted's murder and, they hope, for Amy and Marco's murders as well. The captain encourages Halliday to apply for a permanent homicide position, with Lavelle volunteering as her reference. Harry, the Nocturnal bartender, visits Liv with flowers. For the first time, she remembers him. He introduces himself, and they shake hands as Halliday and Lavelle quietly leave.