When Her Royal Highness Princess Margaret makes a visit to the British Imperial Electric Company factory for the unveiling of the new Standfast Mark Two suface-to-air missile, the Oxford police department is slated to provide security, and the pressure is on. The factory's owners, the Broom family, are also under pressure, but for different reasons; the Broom patriarch, Henry, is depending on his sons and a resolution of a labor dispute to help him merge with French buyers and fulfill a large order for the Crown Prince Nabil of the United Hashemite Kingdoms.
But when fuselage assembler Percy Malleson is found murdered at the factory after the royal visit, Chief Superintendent Bright is panicked that the crime on his watch will tarnish his reputation irreparably. With his usual disdain for Endeavour, he storms past him, pushing Endeavour into the doorjamb where fresh, still-wet paint soils his coat.
Henry Broom's personal assistant, the lovely young Alice, was the one who found the body. She recognizes Endeavour from Oxford, where she knew him. She knows about the mysterious heartbreak in his past, and the ghosts that haunt him. While Thursday questions the Broom family – the steely ex-wife, Nora; the spoiled youngest, Johnny; the drunken older son, Richard; and the beautiful, aloof Estella – Endeavour takes the workers' statements and encounters the shop steward, union chief Reg Tracepurcel. They learn from Tracepurcel that everyone suspected Malleson of being a spy for management, reporting on his fellow workers' efficiency. The detectives begin to suspect that a coworker with a grudge against Malleson may have killed him, such as Lenny Frost, a worker who'd been suspended over an accident on the shop floor. Frost, meanwhile, secretly meets with Prince Nabil at his hotel.
When Endeavour investigates Malleson's apartment, another mystery is revealed: he is actually Eustace Kendrick, who twelve years earlier was suspected of the disappearance of his girlfriend, a college girl named Olive Rix. Kendrick left the country. But Endeavour finds his sister, who reveals that she'd contacted him to let him know their mother was dying, and he returned, but was trying to clear his name. Because Olive's college bordered the Broom family estate, and on the day of the murder her walk home from work would have taken her through their woods, Endeavour questions the family, who deny knowing her. They reveal a bit about another Broom sibling, the golden boy Harry, who died suddenly years ago.
Meanwhile, Lenny Frost is found dead, electrocuted on the factory floor when he crossed a rain puddle in which lay a split cable. But when Endeavour finds stolen files and plans for the Steadfast missile on the body, and an address for Prince Nabil's hotel in his wallet, he suggests the accident was staged. Lenny, he believes, was set up to be scapegoat for Eustace's killing.
Alice contacts Endeavour about Olive – she remembers seeing the initials OR & HB carved into a tree on the Broom property. This time, the Brooms come clean, revealing that Olive and Harry were involved; that Harry was drunk and heartbroken on the day Olive was killed because she'd broken up with him, and that Richard found Olive's body, and presuming that Harry killed her, he buried the girl, letting an innocent man take the blame. They exhume Olive's body, finding among the bones a shard of porcelain presumed to be from a Victorian jam jar. Bright is pleased: he can now close the case, pinning Eustace Kendrick's murder on Lenny Frost, and Olive's murder on Kendrick; Frost's death was accidental. Endeavour protests, but Bright is more interested in politics than justice.
At the cinema, Endeavour sees newsreel footage of the factory visit and notices that Reg Tracepurcel greets the princess in just his shirtsleeves. Thursday meets Endeavour at the lab, jam jar shard in hand. Together they go to the murder site, where their hunch is confirmed: the porcelain shard matches the electrical wire's ceramic insulator above. They have learned that Reg was repairing the telegraph pole at the murder site the day of the killing. He saw Olive, all alone after her breakup, and attacked her. Twelve years later, a new employee, Percy Malleson, confided in him that he was digging into the Brooms' past to clear his real name of the murder. When Malleson/Kendrick told Tracepurcel he was going to confront the Brooms on the day of the royal visit, he knew he was out of time, so he killed him, then killed Frost to take the blame for Malleson/Kendrick's murder. Their proof is the paint-stained jacket that Tracepurcel had to hide because it implicated him in the crime. Endeavour bluffs that they've found it, Tracepurcel admits everything, and they take him away in handcuffs.