At Malfoy Manor, Snape tells Voldemort the date that Harry’s friends are planning to move him from the house on Privet Drive to a new safe location, so that Voldemort can capture Harry en route.

As Harry packs to leave Privet Drive, he reads two obituaries for Dumbledore, both of which make him think that he didn’t know Dumbledore as well as he should have. Downstairs, he bids good-bye to the Dursleys for the final time, as the threat of Voldemort forces them to go into hiding themselves.

The Order of the Phoenix, led by Alastor “Mad-Eye” Moody, arrives to take Harry to his new home at the Weasleys’ house, the Burrow. Six of Harry’s friends take Polyjuice Potion to disguise themselves as Harry and act as decoys, and they all fly off in different directions. The Death Eaters, alerted to their departure by Snape, attack Harry and his friends. Voldemort chases Harry down, but Harry’s wand fends Voldemort off, seemingly without Harry’s help.

Harry arrives at the Burrow, and when his friends get there, he learns that Moody has been killed and George Weasley maimed in the chase. Harry begins to have visions in which he sees what Voldemort is doing through Voldemort’s eyes, and witnesses Voldemort interrogating a wand maker, trying to find out how to defeat Harry.

Harry, Ron, and Hermione assemble the books and tools necessary to embark on the quest that Dumbledore left them: to find and destroy the Horcruxes into which Voldemort placed fragments of his soul, making himself immortal as long as the objects survive. Rufus Scrimgeour, the Minister of Magic, delivers to them the items Dumbledore left them in his will. Harry is left the Snitch he caught in his first Quidditch match, as well as the Sword of Gryffindor, which Scrimgeour does not give him, claiming it did not belong to Dumbledore. Ron is left a device called a Deluminator that turns lights off, and Hermione is left a book of wizard fairy tales. None of them have any idea what the items mean.

The Weasleys host the wedding of their son Bill to Fleur Delacour. At the reception, Harry hears Ron’s Aunt Muriel telling terrible rumors about Dumbledore: that his sister was a Squib (a non-magical person born to wizard parents) kept prisoner by her family, and that Dumbledore had dabbled in the Dark Arts as a young man. The wedding is interrupted by Death Eaters, as Voldemort has taken over the Ministry of Magic and is now in charge of the wizarding world.

Harry, Ron, and Hermione Disapparate (i.e., teleport) to a busy street in London, where they are soon attacked by Death Eaters. They find safe haven in the enchanted house left to Harry by Sirius Black, Number Twelve Grimmauld Place. There, they discover the significance of the letters R.A.B. In the previous book, Harry Potter and the Half-Blood Prince, Harry and Dumbledore had undergone trials to find a locket that Voldemort had made into a Horcrux, but at the end they found that the locket had been stolen, with a fake locket and note left behind, signed R.A.B. Now, they see that the initials belong to Sirius’s dead younger brother, Regulus Arcturus Black, who had been one of Voldemort’s followers. They remember that they have seen a locket in the house that is now gone.

Harry and his friends summon Kreacher, the house-elf who came with the house. Kreacher explains that Voldemort had used him to test the magical defenses guarding the locket, having borrowed him from Regulus. Afterward, Regulus had a change of heart about serving Voldemort, and Kreacher had helped him to steal the locket and leave the fake one in its place. The real locket had been in Kreacher’s possession for many years, but was recently stolen by Mundungus Fletcher. Harry orders Kreacher to find Mundungus and bring him back.

Kreacher returns later with Mundungus, who reveals that the locket was confiscated from him by Dolores Umbridge, a senior official at the Ministry of Magic. Ron, Harry, and Hermione disguise themselves as Ministry employees and sneak into the Ministry, stealing the locket from Umbridge, while witnessing the Ministry’s efforts to persecute wizards who don’t come from pureblood wizard families.

As they Disapparate back to the house on Grimmauld Place, Hermione accidentally leads one of the Death Eaters inside the protective enchantments, so they are forced to abandon the house and go on the run, moving from place to place and camping in the woods. They don’t know where to look for the next Horcrux, and they don’t know how to destroy the locket, which is protected by powerful magic. Harry has a vision of Voldemort tracking down another famous wand maker and looking for a young man who stole a wand.

One night, in the forest, Harry and friends overhear a goblin saying that the Sword of Gryffindor that had been in the headmaster’s office at Hogwarts is a fake. Harry realizes that the real Sword of Gryffindor has the power to destroy Horcruxes, and that they need to find it. Ron, frustrated at their lack of progress, gets fed up and abandons Harry and Hermione.

Harry and Hermione go to Godric’s Hollow, where they visit the graves of Harry’s parents and see the house where he lived before Voldemort killed them. An old woman named Bathilda Bagshot leads them into her house, and they follow, hoping that she knew Dumbledore and can give them the sword, but she turns out to be dead, her body inhabited by Voldemort’s snake, Nagini. They barely escape, and Harry’s wand is destroyed in the fight.

Harry reads the new (and malicious) biography of Dumbledore, which claims that Dumbledore helped the Dark wizard Grindelwald as a young man and may have been responsible for his own sister’s death. Harry recognizes in a photograph in the book the young man whom Voldemort is seeking, and it is Grindelwald.

One night, while Harry is keeping watch, a silver doe Patronus appears and leads him to the Sword of Gryffindor, buried beneath the ice in a pond. Harry dives in, and the locket Horcrux around his neck tries to strangle him. Ron, who has returned, saves Harry, recovers the sword, and destroys the locket.

Harry, Ron, and Hermione go to visit Xenophilius Lovegood, because Hermione has discovered a strange symbol in the book Dumbledore left her, and they had seen Xenophilius wearing it. Xenophilius explains that the symbol represents the Deathly Hallows, three objects—the Elder Wand, Resurrection Stone, and Invisibility Cloak—that were made by Death and that give the owner of the three objects mastery over death.

Xenophilius betrays them to the Death Eaters, hoping to free his daughter Luna, whom the Ministry has imprisoned, and they narrowly escape from his house. Harry is tempted to pursue the Hallows and abandon his quest for the Horcruxes. Harry accidentally says Voldemort’s name, which triggers a tracking spell, and they are caught by Voldemort’s followers and taken to Malfoy Manor.

At Malfoy Manor, Bellatrix Lestrange tortures Hermione for information about where they got the sword they are carrying, since she thought it was in her vault at Gringotts bank. She is very concerned about anything else they might have taken. Dobby, the Malfoys’ former house-elf, helps Harry and his friends to escape, along with Ollivander the wand maker, Luna Lovegood, and Griphook the goblin. Harry takes them all to Ron’s brother Bill’s cottage.

Harry guesses that Voldemort has a Horcrux stored in Bellatrix’s vault, since she seemed so worried about it, and he persuades Griphook the goblin to help him break into the vault. With Griphook’s help, Harry, Ron, and Hermione break in and steal the Hufflepuff Cup from the vault, then escape on the back of a dragon.

Harry learns from a vision of Voldemort’s that the final Horcrux is at Hogwarts, so they travel to the nearby village of Hogsmeade. There they meet Aberforth, Dumbledore’s brother, who helps them get into Hogwarts through a painting by summoning Neville Longbottom, who has been organizing meetings of Dumbledore’s Army in the hidden Room of Requirement. Harry asks the members of the D.A., who are all his supporters, if they can think of an important item associated with the school, hoping such an item might be the final Horcrux. The Ravenclaw students tell him about the lost diadem of Ravenclaw.

While Harry looks for the diadem, the professors and students of Hogwarts rally to his defense, having been warned that Voldemort is on his way. Voldemort and his followers attack the school in a great battle, and Harry finds and destroys the diadem Horcrux.

Harry witnesses Voldemort murdering Snape in order to take possession of Dumbledore’s powerful wand (since Snape killed Dumbledore, Snape is presumably the wand’s true master until someone kills him). Before he dies, Snape gives Harry his memories, extracted for viewing in the Pensieve.

Harry goes to the Pensieve in the headmaster’s office and views the most important moments of Snape’s life. He learns that he has been completely mistaken about Snape, who loved Harry’s mother, Lily Potter, his whole life. Snape had spent his entire adult life spying on Voldemort for Dumbledore and working to protect Harry.

From one of Snape’s conversations with Dumbledore, Harry learns that there’s a piece of Voldemort’s soul inside him (Harry is in fact the final Horcrux), and that he will have to let Voldemort kill him before Voldemort can die. He goes into the forest and lets Voldemort kill him, then wakes up in a dreamlike version of King’s Cross train station, where Dumbledore meets him and tells him that he hasn’t died, and that the protective charm Lily Potter placed on Harry is kept alive inside of Voldemort, because Voldemort used Harry’s blood to reconstitute himself. Thus, Voldemort could not kill Harry, and Harry can now go back and finish him off.

Voldemort takes Harry, whom he believes to be dead, back to Hogwarts to demand its surrender. The students and teachers defy Voldemort, and Neville uses the Sword of Gryffindor to kill the giant snake, Nagini, which was the last Horcrux keeping Voldemort invulnerable. A final battle erupts, and Harry reveals that he’s still alive, going on to kill Voldemort in a duel.

In an Epilogue set nineteen years later, Harry is married to Ginny and is sending their children to Hogwarts. Ron and Hermione are married, and their families are both thriving.