Harry Potter is trying to do his summer homework on medieval witch hunts, but he has to do it at night in secret in case his aunt and uncle, Petunia and Vernon Dursley, wake up. Harry realizes that it's after midnight--it's now his birthday. He looks out his window and sees three owls flying towards him. They carry gifts from his friends Ron, Hermione, and Hagrid. He also receives a permission form to visit Hogsmeade while at school, to be signed by a guardian. The next day, Harry sees a convict named Sirius Black on the news and learns that Aunt Marge is coming to visit. She's horrible to Harry. Harry gets through her visit by reminding himself of the deal that he made with Vernon: Vernon will sign the Hogsmeade form if Harry behaves. On Marge's last night, Harry loses his temper, inflates Marge like a balloon, and leaves the house. He sees a huge black dog and accidentally summons the Knight Bus. Stan, an employee on the bus, explains that Sirius Black escaped from the wizard prison Azkaban, where he was imprisoned for killing thirteen people with a single curse. When the bus drops Harry off at the Leaky Cauldron, Cornelius Fudge, the Minister of Magic, meets him and doesn't expel Harry for doing magic in front of muggles.
Harry spends the next three weeks staying in the Leaky Cauldron and wandering Diagon Alley. He finally meets Hermione and Ron on the last day of summer vacation and accompanies them to a magical creature shop so that Hermione can buy an owl and Ron can get medicine for Scabbers. However, a huge orange cat named Crookshanks tries to eat Scabbers in the shop and Hermione buys the beast. After dinner, Harry overhears Mr. Weasley and Mrs. Weasley saying that Sirius Black wants to kill him. Harry tells Ron and Hermione on the train the next day, in a compartment with only the new Defense Against the Dark Arts teacher, Professor Lupin, sleeping in it. After a few hours, the train stops and people come on board. The "people" are dementors and as one opens the door to Harry's compartment, he faints and hears a woman screaming. Lupin sends the dementor away and distributes chocolate. McGonagall calls Harry and Hermione to her office so Harry can receive chocolate, but he has no idea what she tells Hermione.
Hermione's schedule looks strange, as she has multiple classes scheduled for the same time. They have Divination first, which is taught by Professor Trelawney. She predicts that Harry will die and sees the Grim, a death omen, in Harry's tealeaves. After lunch the trio has Care of Magical Creatures, which Hagrid teaches. He introduces the Gryffindor and Slytherin students to hippogriffs. Malfoy insults a hippogriff named Buckbeak, and Buckbeak strikes Malfoy. In Potions later that week, Malfoy arrives late and plays up his injuries. The Gryffindors have Defense Against the Dark Arts next with Lupin. Lupin conducts a practical lesson on how to fight boggarts, which are shape-shifters that imitate each person’s worst fear. Lupin stops the lesson before Harry can have a turn.
A few weeks later, Quidditch practice starts and the school announces the first Hogsmeade weekend. As Harry, Ron, and Hermione discuss Hogsmeade, Crookshanks makes a leap to eat Scabbers. While Ron and Hermione are in Hogsmeade the next day, Harry wanders the halls. Lupin finds him and invites him to have tea. He admits that he didn't let Harry fight the boggart because he didn't want Voldemort to appear and scare everyone. Snape enters to give Lupin a suspicious smoking goblet. As everyone heads upstairs after the feast, they discover that Sirius Black tried to break into Gryffindor Tower and destroyed the Fat Lady's portrait. Dumbledore sends all students to sleep in the Great Hall and appoints a painting of a knight named Sir Cadogan to guard the Gryffindor portrait hole. Harry is late to Defense Against the Dark Arts the next day and discovers Snape standing in for Lupin. Snape teaches the class about werewolves.
The first Quidditch match is the next day. Rather than playing Slytherin, Gryffindor plays Hufflepuff. The weather is horrendous and Harry has an awful time: he sees the black dog again and as he chases the Snitch, dementors swarm the field and he passes out. He wakes up in the hospital wing and the team tells him that he fell off his broom and Hufflepuff won. Hermione explains that the Whomping Willow destroyed his broom. After Lupin's class later that week, Lupin tells Harry that he's so affected by the dementors because his past is especially dark, and Harry admits that he hears Lily screaming when he sees them. Harry asks if Lupin can teach him to fight dementors, and Lupin agrees.
The next Hogsmeade trip is scheduled for the Saturday before Christmas. After Harry says goodbye to Ron and Hermione, Fred and George pull Harry aside and give him the Marauder's Map, which shows everyone in Hogwarts as well as secret passages out of the castle. In the Three Broomsticks, Harry inadvertently learns that Sirius Black betrayed his parents and is his godfather. Harry is filled with rage and the next day, admits he wants revenge. He goes to Hagrid to confront him about his silence, but the trio learns that Buckbeak's case will go on to the Committee for the Disposal of Dangerous Creatures, which is in Lucius Malfoy's pocket.
On Christmas, Harry receives the newest racing broom, a Firebolt, with no note. Crookshanks makes another attempt at Scabbers's life and after Christmas dinner, Hermione tells McGonagall about the Firebolt. McGonagall confiscates the broom to check it for jinxes and Hermione says she believes the broom came from Sirius Black. Furious, Harry and Ron ignore Hermione for days and Harry has his first private lesson with Lupin. They work with a boggart, since it will turn into a dementor. Harry tries to conjure a Patronus charm to defeat it but fails. This continues for a month without improvement, though things start to get better when McGonagall gives Harry the Firebolt back. Minutes after Harry and Ron decide to make up with Hermione, Ron discovers blood on his sheets: he believes Crookshanks ate Scabbers. Harry suspects it's the end of Ron and Hermione’s friendship.
During the next Quidditch match, Gryffindor beats Ravenclaw and Harry conjures a Patronus when three dementors take the field--but the dementors are actually Malfoy and his cronies in disguise. Minutes after Harry goes to sleep that night, Ron's scream jerks him awake: Ron woke up to Sirius Black with a knife. Sir Cadogan confirms that he let Black into the common room. The next day, Harry and Ron receive an invitation to have tea with Hagrid, who encourages them to forgive Hermione. When the boys get back to the common room, they see that there will be another Hogsmeade trip the coming weekend. Harry agrees to go with the Invisibility Cloak. He's briefly held up by Snape on the morning of the trip, but he manages to find Ron in Hogsmeade. However, as the two visit the Shrieking Shack and Harry throws mud at Malfoy, the Cloak slips and Malfoy sees Harry's face. Snape tries to punish Harry immediately upon Harry's return, but Lupin covers for Harry and confiscates the Marauder's Map. Hermione meets Harry and Ron on their way back to the common room with a note from Hagrid: he lost Buckbeak's trial. Hermione acts strangely the next few days; she slaps Malfoy, "forgets" to go to Charms, and walks out of Divination.
A week later, after the dirtiest Quidditch game Harry has ever played, Gryffindor beats Slytherin and wins the Quidditch Cup. The trio learns that Buckbeak's final appeal will be at Hogwarts on the last day of their exams. Exam time arrives. Divination is the strangest for Harry, as during his private exam, Trelawney makes a prediction that Voldemort's servant will return to Voldemort. That evening, Hagrid writes to say that Buckbeak lost his appeal. Harry, Ron, and Hermione sneak down to Hagrid's hut under the Invisibility Cloak. Hermione discovers Scabbers in a milk jug and Hagrid shoos them all out before the execution party arrives. Halfway back to the castle, they hear the axe fall and Scabbers escapes. Ron catches Scabbers under the Whomping Willow, but a big black dog grabs Ron and drags him into the tree's roots. Crookshanks stops the tree so that Harry and Hermione can follow. They follow a tunnel until they reach the inside of the Shrieking Shack, where they discover Sirius Black with Ron.
Filled with rage, Harry tries to fight Black. They hear someone downstairs, Hermione screams for help, and Lupin races up the stairs. He embraces Black, which makes Hermione shriek that he's a werewolf. Lupin affirms this and then says things that don't make sense: he saw on the Marauder's Map that Harry, Ron, Hermione, and a fourth person entered the Whomping Willow. That fourth person is an Animagus named Peter Pettigrew, who can turn into a rat and has been living for twelve years as Scabbers. Lupin and Black explain that Black, Pettigrew, and James Potter became Animagi as students to keep Lupin company during his transformations into a werewolf. Snape suddenly appears, but Harry, Ron, and Hermione knock him out. Lupin and Black force Scabbers to transform and he becomes the man Peter Pettigrew. Black explains that Pettigrew betrayed Harry's parents and framed Black. Harry believes Black's story, and the group makes its way back through the tunnel so they can turn in Pettigrew. Harry accepts Black's invitation to come live with him but out in the moonlight, Lupin transforms into a werewolf and Pettigrew escapes. Harry and Hermione find Black by the lake and the dementors swarm around them. A real Patronus chases the dementors away.
Harry and Hermione wake up in the hospital wing to the sound of Fudge and Snape talking about Black. They try to tell Snape and Dumbledore the truth, but Dumbledore sends everyone away and tells Hermione that they need more time. Hermione uses a necklace to take Harry back in time three hours. She explains that this is how she's been getting to her classes all year. They realize that Dumbledore wants them to save Buckbeak too and Harry steals him from under the executioner's nose. Harry admits to Hermione that he saw James conjure the Patronus. After Lupin turns into a werewolf, Harry, Hermione, and Buckbeak hide in Hagrid's hut. Harry sneaks out, hoping to see his father, but realizes that he is actually the one to conjure the Patronus. It's a massive stag. Minutes later, he and Hermione fly Buckbeak to the appropriate window, find Black, and send him away with Buckbeak. They make it back to the hospital wing just in time, though Snape is furious that Black got away.
The next day, Harry learns that Lupin resigned after Snape let slip that he's a werewolf. Harry goes to say goodbye and learns that his father's Animagus form was a stag. Dumbledore arrives to say goodbye to Lupin and after Lupin leaves, Dumbledore insists that the trip back in time was a success. Harry feels morose until halfway home, when a small owl brings him a letter from Black. It includes a note giving Harry permission to visit Hogsmeade and says that Ron can keep the owl.