When Harry enters his sixth year at Hogwarts School of Witchcraft and Wizardry, the world is in turmoil. Voldemort's army is gaining force and momentum, and tragedies are everyday occurrences. The Muggle world is experiencing great loss and havoc as well, and fear abounds. The Prime Minister of the Muggle world meets with both the former and current Ministers of Magic, and the news is not good. It would seem that a war is at hand, and even Hogwarts isn't entirely safe.
After seeing Draco Malfoy conduct sketchy business at Borgin and Burkes at the beginning of the school year (while on a school supply shopping trip with the Weasleys in Diagon Alley), Harry is convinced that Draco now works for Voldemort and is plotting something big. Harry proceeds to spend his year at Hogwarts following Draco's actions carefully. However, few believe Harry's theory that Draco has become a Death Eater.
Hormones are raging at Hogwarts, and Harry, Ron, and Hermione's friendships are put to the test. Ron finds his first girlfriend in Lavender Brown, which sends Hermione into a poorly concealed rage most of the time. Meanwhile, Harry begins to realize that he has feelings for Ginny Weasley, Ron's little sister.
The sixth year homework load is intense, and everyone (including Hermione) seems to struggle under the weight and difficulty of the work assigned. Professor Snape has assumed the illustrious role of Professor of the Defense Against the Dark Arts, and he proceeds to make Harry's life miserable, making sure to give him detention whenever possible. Professor Horace Slughorn joins the Hogwarts faculty as the new Potions teacher, and he finds Harry to be a Potions superstar (thanks to a mysteriously helpful used textbook Harry finds, which once belonged to a former student known as the Half-Blood Prince). To Hermione's frustration, Harry follows the Half-Blood Prince's tips and effortlessly excels in Potions. The sixth year is also the year in which Harry and his friends begin to learn how to Apparate, or to travel from one place to another magically.
Throughout this sixth year, a number of tragedies and inexplicable events strike members of the Hogwarts community. It would seem that there is someone within the walls of Hogwarts conducting dark magic, carrying out orders from the Dark Lord himself, and Harry is bent on figuring out what exactly is going on. At times this mission of Harry's is thwarted by other responsibilities, like captaining the Gryffindor Quidditch team, which turns out to be a really tough job. Everyone expects Harry to lead Gryffindor to victory, but his mind is elsewhere.
Dumbledore decides at the beginning of this school year that he should take a bigger role in Harry's education, and he arranges for Harry to have private lessons with him every so often. Harry, elated by this news, soon discovers that these private lessons involve traveling into the memories of those who knew Voldemort once upon a time. Over the course of several visits, Harry and Dumbledore venture into precious memories, gathering essential information about Voldemort's family, his childhood, his schooling at Hogwarts, and how he came to be the Dark Lord. The final memory is one that Dumbledore needs most but is unable to procure as it belongs to Professor Slughorn, who has intentionally erased it using complicated magic. Dumbledore implores Harry to convince Slughorn to give him this memory, a task that proves almost impossible, as Slughorn will stop at nothing to avoid Harry once he knows what Harry is after.
As luck would have it, Harry possesses a good luck potion, Felix Felicis, which he earned for winning a contest in Potions class (thanks, Half-Blood Prince). One day, when Harry is all out of ideas about how to get the memory from Slughorn, he drinks part of the potion and, through a string of very lucky instances, is able to get the memory from Slughorn.
When Dumbledore and Harry travel into this particular memory, they realize that it shows the moment at which Voldemort first learned about Horcruxes. A Horcrux is a powerful, outlawed kind of Dark Magic that allows the soul to be divided, giving its owner the ability to become immortal. When he was at Hogwarts, Voldemort once convinced Slughorn to give him valuable information about Horcruxes, and what resulted was (Dumbledore supposes) a quest to divide his soul seven times and to hide each piece in various vessels in locations around the world. Using the memories that he has already collected pertaining to Voldemort, Dumbledore can make good guesses about where Voldemort's Horcruxes might be. The only way to kill Voldemort is to destroy every single Horcrux, which, Harry realizes, will be his ultimate goal and mission in life.
After traveling to retrieve the first Horcrux, a task that proves to be incredibly difficult, dangerous, and scary, Harry and Dumbledore arrive back at Hogwarts only to find that the castle has been invaded by Death Eaters. The Dark Mark (the sign of Voldemort) floats like a cloud over the castle tower. As Dumbledore and Harry fly to the tower over which the Dark Mark lingers, they discover that the Dark Mark is a trap intended to lure Dumbledore to that very tower. Before he is cornered by Death Eaters, Dumbledore is able to use his magic to hide Harry and to make him temporarily immobile and mute, so that the Death Eaters will not discover him.
Draco Malfoy arrives first at the scene, his wand pointed at Dumbledore, intent upon killing him. Draco is nervous and shaky – it doesn't look like he'll be able to go through with killing the great wizard. But he's under orders from the Dark Lord, who has specifically stated that no one but Draco is allowed to kill Dumbledore that night. Soon Draco is flanked by his fellow Death Eaters who taunt Dumbledore and urge Draco to pull the trigger. But Draco can't do it. Then Snape arrives. Knowing that powerful Aurors bent on protecting Dumbledore have arrived, Snape kills Dumbledore, sending him tumbling off the edge of the tower.
Harry is overwhelmed with grief. He watches Dumbledore die, and he can't do a thing to save him or help him on account of the protective magic Dumbledore had cast upon him. Harry runs downstairs to get help and finds his friends, teachers, and Aurors fighting the Death Eaters in a violent battle. Blood is everyone, but no one is hurt too badly. The Death Eaters leave, and Harry is unable to stop Snape or to use his magic on him. A crowd has gathered around Dumbledore's body, and Fawkes, Dumbledore's phoenix, sings a grief-stricken song. The faculty assembles to decide what should be done next, and to consider closing Hogwarts for good.
Dumbledore wished to be buried on school grounds. On the day of his funeral, people from all over the world come to pay their respects. Everyone from the Minister of Magic, to Hagrid's mother, to the mermaids in the lake, to the centaurs in the forest show up to honor the greatest wizard in the world. Deep in his heart, Harry knows what he must do next. He must hunt Voldemort down and destroy each one of his Horcruxes. Ron and Hermione swear to follow and support Harry no matter what. Harry is left with a heavy heart, but with the knowledge that he has good friends.