After his near-death experience at the hands of a lunatic, Endeavour Morse returns to the force, subdued and shaken. While his colleagues follow up on an incident perpetrated by the daughter of MP candidate Barbara Batten—the mock shooting of Diana Day, Miss Great Britain, during a parade—Endeavour speaks to Bernard Yelland, a distraught father searching for his missing (step)daughter, Frida. He assures Bernard that he will try to help.
Endeavour investigates the scene of an apparent suicide; a John Doe has plummeted through a window to the street below. Endeavour soon suspects foul play. Gas receipts from the John Doe's personal effects take Endeavour to a remote gas station decorated with old posters, including one advertising Caplins Funderland, a long-shuttered holiday camp that used to occupy the property. The owner confirms that a man matching the suicide's description, Meeker, had recently stayed at his lodging. Among Meeker's possessions is a notepad with various notes jotted down: "Friday," "D-Day," and the number 98018. Endeavour immediately starts trying to decipher the note: a telephone number? A connection to the missing girl—not "Friday" but "Frida Y"? Thursday gently suggests that Endeavour is forcing a connection that's not there, but Endeavour knows he's on to something. He discovers that the dentist, Meeker, died two years before.
Another case develops: several Anglo-Saxon treasures have been stolen from display at Beaufort College. The arrogant Dr. Matthew Copley Barnes drips with derision for the police as he describes the stolen trove. But Endeavour suspects a connection with their John Doe, who'd had a guide to the exhibition among his personal affects.
Assigned to security for a beauty contest to be judged by Miss Great Britain, Diana Day, Endeavour meets her and her handlers: the waspish Muriel Todd, her greedy manager/promoter husband, Val, and Val's assistant, Tony (Diana's secret lover). From there he heads to London to investigate a vehicle they believe to be the John Doe's, registered to a John Pettifer. But entering the office of Pettifer Confidential Enquiries, he's knocked unconscious and awakens cuffed to a chair by two thugs who, believing that he's Pettifer, demand the combination to his safe. They flee when Pettifer's secretary finds them. Endeavour opens the safe to find files and surveillance photos of cheating couples. Thursday learns that Pettifer was a shakedown artist who blackmailed the cheaters he discovered through his clients. Among Pettifer's files, Endeavour finds a check signed by Muriel Todd. When questioned, she admits that she'd hired Pettifer to see if Val was cheating…but he wasn't. They follow up with Val who attests to his love for Muriel, describing how he was a nobody when he met Muriel, just an entertainment officer at a cheap holiday camp.
When Endeavour finds a pawnshop ticket in the lining of Pettifer's hat, he turns it in and receives photo negatives of the entrance to an underground tunnel that surfaces inside Beaufort College. Endeavour and Thursday surmise that the tunnel is how the thieves of the trove got into Beaufort. But in the tunnel they discover Frida Yelland's corpse. Based on their similar head wounds, the investigators conclude that Frida and Pettifer were killed at the same hand. But how the negatives and robbery fit in remains a puzzle.
Endeavour searches in vain for a connection between Frida and Pettifer or Beaufort College. A locked box from Frida's room produces a lead: a photographer's contact sheet with modeling shots of Frida posing, stamped with the name Justin Delfarge. Delfarge confirms that his photographer had shot Frida for a local beauty contest run by Val and Muriel Todd's agency, but Val denies knowing Frida. Meanwhile, Frida's box yields another clue: a Killed in Action letter from the War Office for Private J. Spurling, Frida's father, signed by Captain Archibald Batten, husband of MP candidate Barbara.
After an unpleasant conversation with Barnes, Endeavour reexamines Meeker's/Pettifer's note and discovers that the number, flipped to read 8/1086, makes reference to the Domesday Book, which Barnes wrote about in his exhibition guide. Endeavour confronts Barnes and accuses him of theft and murder. But simultaneously, Thursday arrests Delfarge and his photographer, Thomas, recovering the stolen trove from the studio. Thomas, a graduate of Beaufort, shot the trove photographs for the exhibition guide.
But Endeavour is not satisfied. He returns to the gas station and the site of the old holiday camp to find blood, a single curtain matching the one in which Frida's corpse was wrapped. From the stream nearby, he retrieves Frida's dumped suitcase. Later, at the beauty contest, Endeavour finds a picture of an earlier contest, in which Frida was a contestant and Archie Batten was a judge. Through his colleague Strange, he discovers a secret association between police and business leaders: Lodge No. 98018, also known as Doomsday Lodge. Endeavour now can decipher Pettifer's notes and the entire crime falls into place for him.
He tricks Val and Archie into meeting at the old campsite and awaits them with Bright, Thursday and Jakes. With everyone present, he explicates the crime: After the beauty contest, Archie and Frida had a sexual assignation. Frida asked Batten about her father, remembering his name from the Killed in Action letter. Only then did he learn that the girl was Frida Yelland, and only then did Archie realize his inadvertent vile act: he'd slept with his daughter. The real Archie Batten actually died in the war; Spurling stole Batten's identity and abandoned his wife and baby, creating a new life. With so much at risk, Batten couldn't let Frida learn the truth, so he turned to Val, a member of his secret society, to dispose of the girl. Val's thug Tony killed Frida and was in the process of dumping her body in the stream at Caplins Funderland when he was interrupted, forcing him to leave it in the tunnel instead. But he didn't know that Pettifer, hired by Muriel Todd, knew all, until his blackmail photos arrived. Tony was Pettifer's murderer, too.
As Batten, Tony and Val are hauled away, Val suggests that Endeavour make it all disappear. He warns that Endeavour can have powerful friends…or powerful enemies. Later, in secret, Pettifer's black notebook, which had disappeared from the crime scene, surfaces in an unidentified inner sanctum of power.