Lord Voldemort has returned and his wrath has been felt in both the Muggle (non-magical) and Wizarding worlds. Severus Snape, a member of Dumbledore's anti-Voldemort Order of the Phoenix but formerly one of Voldemort's Death Eaters, meets with Narcissa Malfoy, mother of Harry Potter's school rival Draco. Snape makes an Unbreakable Vow to Narcissa, promising to assist and protect Draco.
Meanwhile, Dumbledore collects Harry from his aunt and uncle's house and takes him to the home of Horace Slughorn, former Potions teacher at Hogwarts. Dumbledore tries to persuade a reluctant Slughorn to return to teaching and finally succeeds. Later, when shopping for schoolbooks, Harry and his friends Ron Weasley and Hermione Granger follow Draco Malfoy to Dark Arts supplier Borgin and Burkes, where they overhear Draco insisting the store-owner fix an unknown object. Harry is instantly suspicious of Draco, whom he believes to be a Death Eater like his father.
The students return to school, where Dumbledore announces Snape, the previous Potions teacher, will be teaching Defence Against the Dark Arts, while Slughorn will resume his post as Potions teacher. This allows Harry to continue with a Potions course, in which he now excels, thanks mainly due to having received a used Potions textbook once belonging to someone named "The Half-Blood Prince", which is heavily annotated.
Harry falls in love with Ron's sister Ginny, and Ron and his girlfriend Lavender Brown break up, to Hermione's delight. Harry spends much of his time following Draco Malfoy for any proof of suspicious actions, though he often cannot find him on his magical map of Hogwarts. Harry realises when Draco is not on the map, he is using the Room of Requirement on the seventh floor of Hogwarts, which transforms into whatever its user needs. Harry is unable to gain access to the room unless he knows for what exact purpose Draco is using the room.
Believing Harry needs to learn Voldemort's past to gain advantage in a foretold fight, Dumbledore schedules regular meetings with Harry in which they use Dumbledore's Pensieve to look at memories of those who have had direct contact with Voldemort. Harry learns about Voldemort's family and the influences that corrupted Voldemort. Harry eventually succeeds in retrieving one of Slughorn's memories about how he revealed the secrets about splitting one's soul and hiding it in several objects called Horcruxes. Dumbledore explains that two of these have already been destroyed but that others remain. He suspects three of those to be objects belonging to three of the Hogwarts founders (one for each except Gryffindor), and the last one to reside in Voldemort's snake.
Harry and Dumbledore leave Hogwarts to fetch and destroy one of the Horcruxes. They journey into a cave important to Voldemort's youth that Dumbledore senses is protected with magic. They reach the basin where the purported Horcrux is hidden underneath a potion. Dumbledore drinks the potion and Harry fights off Voldemort's Inferi, an army of re-animated corpses. They take the Horcrux, Slytherin's locket, and return to Hogwarts as quickly as possible. Dumbledore is very weak, and when they reach Hogsmeade they can see the Dark Mark, Voldemort's symbol, visible above the astronomy tower.
When they arrive at the tower, Dumbledore uses his magic to freeze Harry in place while Harry remains hidden by his cloak of invisibility. When Draco Malfoy arrives, he disarms and threatens to kill Dumbledore, acting on his mission from Voldemort. Dumbledore tries to stall Draco by telling him he is not a killer, but Snape bursts into the tower and kills Dumbledore. Because of Dumbledore's death, his spell on Harry is broken and Harry rushes after Snape to avenge Dumbledore's death. Snape reveals he is the Half-Blood Prince and manages to escape. Later, Harry finds out that the locket he and Dumbledore retrieved is not a real Horcrux; containing only a note from someone named "R. A. B".
After Dumbledore's funeral, Hermione explains to Harry that Snape was called the Half-Blood Prince because he had a Muggle father and a magical mother (whose maiden name was Prince). Harry is devastated to think he trusted and took help from the man who would turn out to be Dumbledore's murderer. He tells his friends he will not be returning to Hogwarts next year and will instead search out and kill Voldemort by destroying all of the Horcruxes. Ron and Hermione vow to join him.