As the book opens, a dwarven demagogue, Grag Hamcrusher, is apparently murdered, and the only witness is a confused troll called Brick. As ethnic tensions between Ankh-Morpork's troll and dwarf communities mount in the buildup to the anniversary of the Battle Of Koom Valley, Lord Vetinari convinces Commander Vimes to interview a vampire applicant to the Ankh-Morpork City Watch. The new recruit, Lance-Constable Salacia "Sally" von Humpeding, along with Angua and Carrot, is attached to the investigation surrounding Hamcrusher's death.
Meanwhile, Corporal Nobbs and Sergeant Colon begin an investigation into the theft of the fifty-foot painting, The Battle of Koom Valley by the insane artist Methodia Rascal, from a city museum. Most of the populace believe the painting holds clues to a treasure hidden in Koom Valley. Nobbs has a new girlfriend, the exotic dancer Tawneee; Nobby first caught her eye when slipping an IOU into her garter. Other subplots involve the tension between vampires and werewolves (Sergeant Angua and Lance-Constable Van Humpeding), and the presence of Vetinari's auditor, A.E. Pessimal, in the Watch House.
A recurring element in the book is Vimes' race to get home every night by six o'clock to read the book Where's My Cow? to his infant son ('Young Sam', named after his father), no matter what. Another is the game Thud, which first appeared in Going Postal; the game, which is a symbolic replication of the Battle of Koom Valley, requires the player to learn to think as both sides.
Vimes finds himself pressured by Lord Vetinari to solve the murder quickly, before inter-species war erupts in Ankh-Morpork. Vimes and Sergeant Angua visit the dwarves' under-city mine, where a nervous dwarf named Helmclever draws a mysterious sign in the spilled coffee on his desk. Vimes' particular brand of omnidirectional anger sends him veering off into the mine, where he cuts himself, he supposes, on a locked door. Later, he convinces the deep down dwarves to allow Captain Carrot to be the "smelter" who looks for the truth of the murder.
When Carrot tries to find that truth, however, he is shown a body that was mutilated after death, and a confusing patch of clues. Angua discovers that a troll really WAS in the mine at the time of the murder, much to the consternation and fear of the dwarves who claimed a troll did the killing. This troll turns out to be Brick, who is a gutter troll of the lowest sort, addicted to anything beginning with "S" (such as most troll drugs, which all have names like Slab, Scrape, Slice, Slide etc.) and who becomes the protege of Sergeant Detritus.
Angua and Sally soon discover four more bodies in the mine, dwarves clearly murdered by other dwarves. One of these dwarves used his own blood to scrawl yet another mysterious rune on the back of a door in the mine -- a door that Commander Vimes cut himself on the other side of. The Deep Downers flee for the mountains, taking the talking cube they found at the bottom of Methodia Rascal's well, AND the painting of Koom Valley. As a parting shot, they invade the Vimes mansion and attempt to murder Lady Sybil Ramkin and Young Sam. The two surive unharmed, thanks to the fighting talents of Vimes and the family butler, Willikins.
Vimes, along with wife, child, and several members of the Watch as an entourage, travels to Koom Valley. He believes he's pursuing justice, but an astute troll king named Mr. Shine and a bright young grag named Bashfulsson know that Vimes is carrying the Summoning Dark, the quasidemonic entity that wreaks vengeance on dwarves who have done evil in the sight of other dwarves. Vimes acquired the Summoning Dark when he touched the cursed door in the city mine, but his own internal watchman proves stronger than it is. As the Commander discovers, the real secret of Koom Valley is that trolls and dwarves did not intend war, but died together, friends, not enemies, in the deluge that ended the first battle. The ancient troll king and dwarf king were found in a deep cavern, preserved by centuries of dripping stone, playing a game of Thud.
Doreen, the non-vampire wife of vampire-by-inheiritance Arthur Winkins, appears as a vocal and powerful member of the League of Temperance, although she still isn't a real vampire. She is very enthusiastic about her quasi-vampiric status, and Vimes has to constantly restrain himself from saying rude but accurate things to her, including "...and incidentally, your fake fangs rattle when you talk!"
! colspan="3" | Reading order guide |}