Part of Terry Pratchett's
Discworld series, the novel is set in Ankh-Morpork, a sprawling, corrupt fictional city.
On May 25th, Commander Sam Vimes, Duke of Ankh and head of the City Watch, discovers a young Assassins' Guild student trapped in a cesspit on his estate. He learns the Guild has removed him from its assassination register, a distinction shared only with Lord Vetinari, the city's ruler. His wife, Lady Sybil, is pregnant and near her due date. When Vimes encounters a blooming lilac tree, he is visibly shaken and carries a sprig inside, where his butler Willikins pins it to his dress uniform. The lilac marks a painful anniversary: At the Watch House, Sergeant Fred Colon and Corporal Nobby Nobbs also wear lilac, and when a young officer asks about the tradition, Colon makes clear that only those who "were there" may wear it.
Captain Carrot reports that Sergeant Stronginthearm has been murdered by Carcer, a serial killer the Watch has hunted for weeks. Carcer is uniquely dangerous: cheerful, utterly amoral, and convinced of his own innocence even amid carnage. After Carcer is cornered at Unseen University, Vimes pursues him across the rooftops during a thunderstorm charged with magical energy. They struggle on the Library's glass dome, and when lightning strikes, the discharge hurls them roughly 30 years into the past.
Vimes awakens in the Ankh-Morpork of his youth with a slashed face and an eyepatch. Rosie Palm, a young woman connected to the city's seamstresses, and a doctor named Mossy Lawn treat his wounds. Vimes gives his name as "John Keel," the mentor whose memory has been on his mind all day. Disoriented, he visits his own home and encounters a teenage Lady Sybil, confirming he has traveled into the past. After being arrested and thrown into a cell beside Carcer, who has already adapted by robbing muggers and bribing guards, Vimes is brought before Captain Tilden. Tilden reveals that the real John Keel was found murdered in the street and suspects Vimes of the killing.
A mysterious figure intervenes. Lu-Tze, called "Sweeper," belongs to the History Monks, an order that monitors the flow of time using devices called Procrastinators: massive spinning cylinders that store and redistribute time. Sweeper explains that Vimes and Carcer have created a dangerous anomaly, with two versions of the present existing side by side. Carcer killed the real Keel, and now young Sam Vimes, the commander's own past self, has no mentor to teach him proper policing. Without Keel's influence, the young man may learn from corrupt officers, and the future Commander Vimes may never exist. Vimes agrees to assume Keel's identity, train his younger self, and guide events through the coming revolution.
Returned to the Watch House with his memory of the temple visit erased, Vimes assumes the rank of sergeant-at-arms. He takes command of the Treacle Mine Road Night Watch, expelling a corrupt corporal, promoting Fred Colon, and elevating Ned Coates to lance corporal. With the Watch House jailer, Snouty, handling logistics, Vimes teaches young Lance Constable Sam Vimes to think independently and resist the Watch's pervasive corruption. On patrol, he confronts Captain Findthee Swing's secret police, the Unmentionables, with demands for proper prisoner documentation. Swing practices craniometrics, a pseudoscience based on skull measurements. Meanwhile, Carcer has been hired by Swing as a sergeant and makes a veiled threat after encountering young Sam by name, recognizing the leverage the boy represents.
Vimes's actions draw attention from Madam Roberta Meserole, a wealthy political operator from the distant city of Genua. She seeks to undermine Lord Winder, Ankh-Morpork's Patrician, or autocratic ruler, and offers Vimes command of the entire Watch under Lord Snapcase, the popular alternative to Winder. Vimes refuses, recognizing that the Watch under any of these rulers would become just another political gang. Madam Meserole's nephew, the young Havelock Vetinari, a student at the Assassins' Guild, secretly observes Vimes on her orders. Both recognize Vimes as incorruptible and therefore dangerous.
When the Dolly Sisters Massacre occurs, with cavalry charging into a crowd protesting bread prices, tensions across the city explode. Watch Houses are attacked, but Vimes keeps the Treacle Mine Road house open and welcoming. He captures infiltrating Unmentionables and extracts a confession by using ginger beer bottles to simulate torture sounds. When a new captain, the arrogant Ronald Rust, orders the men to fire on civilians behind a barricade, Vimes refuses. Young Sam aims a crossbow at Rust, and Vimes knocks the captain unconscious, taking command and incorporating the barricade builders into his perimeter.
Vimes leads a raid on the Cable Street headquarters of the Unmentionables, discovering a torture chamber. Some prisoners can be saved; others are beyond help. When young Sam tries to attack the torturer, Vimes restrains him, insisting they must not become what they fight. He kills Swing and burns the building. The resulting People's Republic of Treacle Mine Road expands to nearly a quarter of the city, controlling food warehouses while the rest faces shortages. Reg Shoe, an idealistic young revolutionary, drafts manifestos while practical men handle food distribution. Vimes disables a military siege engine by wedging its wheels and dosing the oxen with ginger, causing a stampede through the attackers' lines.
At a Palace party, Madam Meserole orchestrates a political realignment. Winder is assassinated by an unidentified figure in traditional Assassin's black who walks up to him in a brightly lit room; the terror causes Winder to die of apparent heart failure before the sword strikes. Snapcase is installed as Patrician within minutes, and an amnesty is declared.
Despite the amnesty, Snapcase orders Vimes killed and appoints Carcer as Captain of the Palace Guard. Carcer leads a force to hunt Vimes, whose men wear lilac sprigs as identification. In the ensuing battle, several of Vimes's men fall: the watchmen Nancyball and Wiglet, Sergeant Dickins, the jailer Snouty, and Ned Coates, who had joined Carcer's force but turned against the attackers in a final act of loyalty. Reg Shoe is struck by multiple bolts but rises and keeps fighting, his willpower making him a natural zombie. The History Monks intervene, freezing time to dress the real Keel's preserved body in Vimes's armor so history records Keel dying in battle. Vimes grabs Carcer, and both are transported forward to the present.
Vimes materializes naked at the University. Realizing Carcer may have appeared near his home, he races to Scoone Avenue, where Sybil's labor has become dangerously complicated. He brings the now-elderly Dr. Lawn, whose obstetric expertise saves Sybil and delivers a healthy boy she names Sam.
That evening, Vimes visits the Cemetery of Small Gods, sits on Keel's headstone, and watches Reg Shoe dig himself out of his grave for his annual commemorative burial. Vimes reflects on the seven who died, recognizing they stayed not to be heroes but because the job was in front of them. Carcer attacks him at the grave. The Beast, Vimes's term for his capacity for lethal violence, screams for the kill, but Vimes envisions young Sam watching across 30 years and drops his sword. He disarms Carcer, binds him, and formally arrests him, promising a fair trial followed by a lawful hanging. Lord Vetinari emerges from the shadows, revealing he witnessed the original events as a young man. Vetinari offers to restore the old Watch House as a memorial, but Vimes refuses, declaring that the dead should simply be left in peace. Vimes drags Carcer to Pseudopolis Yard for booking, and on his walk home, tosses a cigar stub over the fence of the monks' hidden temple: a wordless acknowledgment between the policeman and the order that helped him find his way back.