Harry has a vision of Voldemort receiving the summons. Luna Stuns Alecto, knocking her out and waking the Ravenclaw students, who enter the common room. Amycus pounds on the door, but he’s too stupid to answer the doorknocker’s next question, and can’t get in. Harry slips into Voldemort’s mind and sees that Voldemort has decided to check on his locket Horcrux before coming to Hogwarts, giving Harry a little extra time.
Professor McGonagall arrives outside the room and lets Amycus in. Harry and Luna have recloaked, and Amycus sees only his Stunned sister on the floor. His chief worry is that they will be punished for giving a false alarm, and he muses aloud that he can blame the summons on the Ravenclaw students, so Voldemort may be satisfied with killing a few of them. When Professor McGonagall stands up to Amycus defiantly, he spits in her face, prompting Harry to step out of the Cloak and deliver a Cruciatus Curse at Amycus.
Professor McGonagall urges Harry to flee, but when he explains that he is looking for the lost diadem of Ravenclaw on Dumbledore’s orders, she says that the teachers will secure the school from Voldemort while he searches. Visions of Voldemort reveal to Harry that Voldemort has discovered that his locket is missing and is on his way to the school.
Harry and Professor McGonagall quickly make a plan to alert the other heads of houses and evacuate any students unwilling or too young to fight against Voldemort. They are on their way to alert the heads, with Harry and Luna hidden under the cloak, when they meet Severus Snape in the hallway. When Snape demands to know if McGonagall has seen Harry Potter, she attacks him, and they duel. McGonagall holds Snape at bay, and he is finally forced to take flight when Professors Sprout and Flitwick run up to aid her. Snape leaps from the window and flies away on huge, batlike wings.
Professor McGonagall organizes the other professors in establishing magical defenses and evacuating students, putting to work those students who can help defend the school, including Dumbledore’s Army. Lupin and the entire Weasley family enter the school in order to help, with Percy apologizing for being a pro-Ministry prig and Lupin showing pictures of his and Tonks’s baby.
Ginny Weasley tells Harry that Ron and Hermione said something about heading to a bathroom. Harry starts to look for them when he has a vision of Voldemort arriving at the school gates, Nagini draped across his shoulders.
As the students of Hogwarts prepare to fight or flee, Voldemort’s voice echoes through the school, promising to leave Hogwarts untouched if Harry Potter is handed over by midnight. Pansy Parkinson of Slytherin House shouts that they should grab Harry, but the Gryffindors, Hufflepuffs, and Ravenclaws all stand in his defense. The Slytherins all leave the school, but McGonagall has to force out the members of other houses who are underage but want to stay and fight for Harry.
The professors go to man their battle positions, as Harry turns back to his search for the lost diadem of Ravenclaw. Remembering that the diadem has not been seen “in living memory,” he decides to ask the dead—the Gray Lady, who is the House ghost of Ravenclaw. Harry finds the Gray Lady, who refuses to help him until he confronts her with the threat to Hogwarts. Then she admits that she is the ghost of Helena Ravenclaw, the daughter of the founder. Helena had stolen the diadem, hoping to make herself smarter and more important than her mother. She fled to hide in a forest in Albania, and her mother, Rowena, concealed the theft. On her deathbed, Rowena wanted to see her daughter one last time, so she sent a man who loved Helena to seek her out. Helena refused to come, and the young man killed her in anger, then killed himself. The young man became the Hogwarts ghost known as the Bloody Baron, while the diadem was left in the forest.
Pressed by Harry, the Gray Lady admits that she told her story to Tom Riddle (Voldemort’s name when he was a student at Hogwarts). Harry guesses that Tom Riddle went and found the diadem in the forest, but when he made it a Horcrux, re-hid it at Hogwarts. (Harry knows from his vision that it’s at Hogwarts now.) He reasons that Voldemort’s only chance to hide it after he graduated from Hogwarts would have been the day he came to ask Dumbledore for a job, on the way to or from Dumbledore’s office.
Harry leaves Ravenclaw Tower and runs into Hagrid, who is with his giant dog Fang and giant half-brother, Grawpy. Harry leads them off in search of Ron and Hermione, seeing signs everywhere that the battle for Hogwarts has begun. As they run through the school, Harry remembers with a shock that he has seen the diadem in the Room of Requirement, in its form of “the room where everything is hidden,” when he hid his own Potions book there in Harry Potter and the Half-Blood Prince.
Finally, Harry encounters Ron and Hermione, who have gone to the Chamber of Secrets to retrieve basilisk teeth to destroy Horcruxes with. Ron was able to imitate Harry speaking Parseltongue to gain entry to the room, and they destroyed the cup. Harry, Ron, and Hermione go to the Room of Requirement, taking stock of the ever-worsening battle swirling around them. In the room, amid the labyrinth of hidden objects, Harry finds the diadem but is confronted by Draco Malfoy and his cronies, Crabbe, and Goyle, who followed Harry in to capture him, hoping to hand him over to Voldemort.
Crabbe and Goyle try to kill Harry rather than capture him, for once ignoring Draco’s leadership, and in the struggle the diadem is dropped. Crabbe uses a fire curse to try to kill Harry and his friends, and it rages out of control. Harry and Ron seize broomsticks and save Hermione, Goyle, Malfoy, and the diadem, but Crabbe dies. Outside the Room of Requirement, they see that the diadem Horcrux has been destroyed by the fire curse.
A noise in the corridor alerts them that Death Eaters have gained entrance to Hogwarts. They go to help the defenders of Hogwarts, and in the ensuing battle, Fred Weasley is killed.
In these chapters, Harry and his friends return to the halls of Hogwarts, which is of course the setting for all of the other books in the series, but which has long been absent from this one. Hogwarts is much more than just a setting for the action, having been one of the chief attractions for readers of the series, and almost a character in its own right, with its living walls, statues, and portraits and its secrets that not even Dumbledore knew fully. By moving the climactic ending of the book back to Hogwarts, the author allows the school to resume its fascinating role as a character once more, and also raises the stakes of the battle between Harry and Voldemort, as the school itself, and everyone and everything in it, come under attack. For Harry to fight to save the wizarding world, or the world in general, is very abstract. For him to fight to save Hogwarts is something we can picture in detail and care about.
When Harry leaves the Room of Requirement and explores Ravenclaw, we see more reversals in relation to the previous novels. Now Harry walks through the school as an intruder and an adult rather than a student, and the crowds of sleeping Ravenclaw students seem like children in comparison to him. Professor McGonagall, who had always kept him in his place by being the strict disciplinarian, is now seen by Harry as a friend, and he lashes out at Amycus to protect her. She herself views Harry in a different light, for once not trying to order him around for his own good.
Plot developments come very quickly in Chapter Thirty-One, with Harry’s discovery of the diadem’s history and his recovery of it, his final confrontation with Draco, Ron and Hermione’s collection of the basilisk teeth, the mobilization of virtually every remaining character in the book, and the death of Fred Weasley. The book’s focus swings wide in this chapter, encompassing everything and everyone who matters to Harry, so that we can see that everything is to be decided this night.