Harry learns that Voldemort is seeking the Elder Wand, but is unaware of the Hallows and their significance. The trio decides that discovering Voldemort's Horcruxes is more important than procuring the Hallows for themselves. They break into Bellatrix Lestrange's vault at the Wizarding Bank Gringotts to recover another Horcrux, the cup of Helga Hufflepuff. Harry learns that another Horcrux is hidden in Hogwarts, and Harry, Ron, and Hermione enter the school. They find this Horcrux, the Diadem of Ravenclaw, and successfully destroy the cup and the diadem.
The book culminates in the Battle of Hogwarts. Harry, Ron, and Hermione, in conjunction with students and members of the wizarding world opposed to the rise of Voldemort, defend Hogwarts from Voldemort, his Death Eaters, and various magical creatures. Several major characters are killed in the first wave of the battle. Harry discovers that Voldemort inadvertently made Harry a Horcrux when he attacked him as a baby, and that he will have to die to destroy Voldemort. Harry surrenders himself to Voldemort, who attacks Harry with the Killing Curse, sending Harry to a sort of Limbo between life and death. There, Harry meets Dumbledore who explains that because Voldemort used Harry's blood to regain his full strength, Harry is protected from any harm that Voldemort could commit against him, meaning that the Horcrux inside Harry is destroyed, but Harry can return to his body despite being hit by the Killing Curse. Harry then returns to his body, the battle resumes, and after the last remaining Horcrux is destroyed, Harry is able to defeat Voldemort.