Molly Weasley kills Bellatrix in the Great Hall. Neville draws the Sword of Gryffindor from the Sorting Hat, and as Harry confronts Voldemort in a duel throughout the castle, Neville decapitates Nagini, leaving Voldemort mortal. As Neville gives a defiant response, Harry reveals he is alive. Voldemort announces Harry's apparent death to everyone at Hogwarts, and says that anyone who defies him will be killed. Harry decides to return to his body to defeat Voldemort once for all. Voldemort casts the Killing Curse upon Harry, who finds himself in limbo, where Dumbledore's spirit meets him and explains that the part of Voldemort within Harry was killed by Voldemort's own curse. Harry goes to die at the hands of Voldemort in the Forbidden Forest. Harry discovers that he became a Horcrux when Voldemort originally failed to kill him and that Harry must die to destroy the piece of Voldemort's soul within him. Harry also learns that Dumbledore's death at Snape's hands was planned between them. Following her death, Snape worked secretly with Dumbledore to protect Harry from Voldemort because of his love for Lily. Harry learns from Snape's memories that Snape loved Harry's mother, Lily, but despised his father, James, who had bullied him. In the chaos at Hogwarts, Fred, Lupin, and Tonks are killed. Before dying, Snape tells Harry to take his memories to the Pensieve. After entering the boathouse, the trio witness Voldemort telling Snape that the Elder Wand cannot serve him until Snape dies he then orders Nagini to kill Snape. As Voldemort's forces attack the school, Harry, seeing into Voldemort's mind, realises that Voldemort's snake Nagini is the final Horcrux. Harry stabs the diadem with the Basilisk fang and Ron kicks it into the Room of Requirement, where it is destroyed. Goyle casts a Fiendfyre curse and is unable to control it, and is burned to death while Harry and his friends save Malfoy and Zabini. In the Room of Requirement, Draco, Gregory Goyle and Blaise Zabini attack Harry, but Ron and Hermione intervene. Ron and Hermione go to the Chamber of Secrets, where Hermione destroys the Horcrux cup with a Basilisk fang. At Luna Lovegood's insistence, Harry speaks to Helena Ravenclaw's ghost, who reveals that Voldemort performed "dark magic" on her mother's diadem, which is in the Room of Requirement. McGonagall gathers the community of Hogwarts to prepare for battle.
Harry confronts Snape, who flees after Minerva McGonagall challenges him to a duel. Snape hears of Harry's return and warns staff and students of the severe punishment for aiding Harry. They are rescued by Aberforth Dumbledore, who instructs the portrait of his younger sister, Ariana, to fetch Neville Longbottom, who leads the trio through a secret passageway into Hogwarts. The trio apparateinto Hogsmeade, and set off Caterwauling alarms. Harry also realises that there is a Horcrux at Hogwarts somehow connected to Rowena Ravenclaw. Harry sees a vision of Voldemort killing goblins, including Griphook, and learns Voldemort is aware of the theft. The three release the dragon guardian and flee on its back. He retrieves it, but Griphook snatches the sword and abandons the trio, leaving them cornered by the alerted security. In Bellatrix's vault, Harry discovers the Horcrux is Helga Hufflepuff's cup. Ollivander says they belonged to Bellatrix and to Draco Malfoy, but Malfoy's has changed its allegiance to Harry. Harry asks wandmaker Ollivander to identify two wands taken from Malfoy Manor. Griphook agrees, in exchange for the Sword of Gryffindor. After burying Dobby, Harry Potter asks the help of goblin Griphook, Ron, and Hermione to break into Bellatrix Lestrange's vault at Gringotts bank, suspecting a Horcrux may be there. As Lord Voldemort retrieves the Elder Wand from Albus Dumbledore's grave, Severus Snape has become Hogwarts headmaster.