During the summer holidays, Alex Deuyour and his mother, Desiree, send his friend, Harry Potter, gifts for his birthday. They find out that Harry ran away from home after he performed magic on Marge, Harry's uncle, Vernon's sister and that Sirius Black, Desiree's older brother, has escaped from Azkaban, which they are secretly ecstatic despite Minister for Magic Cornelius Fudge wanting her to hunt down Sirius, which she reluctantly agreed to. While checking on the Dursleys, Alex calls out the Dursleys' abuse and mistreatment of Harry. They head to the Leaky Cauldron for the rest of the summer, where they reunite with Harry, Ron Weasley, Hermione Granger, Kate Nguyen, and Matt Crocitto. Harry learns that Sirius has supposedly escaped Azkaban to kill him, but Alex tells him that this isn't true. During the journey to Hogwarts, the Hogwarts Express is boarded by Dementors, ghostly prison guards searching for Black. One enters Alex and Harry's compartment, causing them to faint, but new Defense Against the Dark Arts teacher Remus Lupin repels it with a Patronus Charm. At Hogwarts, Headmaster Albus Dumbledore announces that Dementors will patrol the school until Black is captured.

Rubeus Hagrid is appointed Care of Magical Creatures teacher, but his first class goes awry when Draco Malfoy provokes a Hippogriff named Buckbeak into attacking him; Malfoy's father, Lucius, consequently has Buckbeak sentenced to death.

Returning to Gryffindor Tower, the students find the Fat Lady's portrait has been attacked, and the terrified Fat Lady warns Dumbledore that Black entered the castle. During a stormy Quidditch match, Dementors cause Harry to fall off his broomstick, which is destroyed by the Whomping Willow. Dumbledore uses the Slowing Charm to break Harry's fall, who later wakes up in the infirmary.

Harry, after leaving the infirmary, is caught trying to visit Hogsmeade by Fred and George, who give him the Marauder's Map. Using the map, Harry sneaks into Hogsmeade and learns that Black is his godfather but divulged the Potters' whereabouts to Voldemort and murdered their mutual friend Peter Pettigrew.

Determined to ward off the Dementors, Harry and Alex convince Lupin to teach them the Patronus Charm. After Divination class, he witnesses Professor Trelawney enter a trance and prophesy that the Dark Lord will return. Watching Buckbeak's execution, Ron's pet rat Scabbers bites him and escapes, but a large black dog drags them both into a hole at the base of the Whomping Willow. This leads the group through an underground passage into the Shrieking Shack, where the dog is revealed to be Black, an Animagus who can transform into an animal.

Lupin appears, embracing Black as an old friend before revealing himself to be a werewolf. Snape arrives to apprehend Black but is knocked out by Harry's Disarming spell. Lupin and Black reveal that Scabbers is actually the Animagus form of Pettigrew, who betrayed Harry's parents, faked his death and framed Black for his own crimes. Turning Pettigrew back into human form, the group head back to the castle, intending to both expose Pettigrew as the true criminal and exonerate Sirius, but the full moon causes Lupin to transform and Pettigrew escapes. Black transforms into his animal form and fights off werewolf Lupin, who seriously injures Black. Black manages to escape when a distant wolf cry distracts Lupin and sends him off. Alex and Harry find Black, and the three are attacked by Dementors until unseen figures cast a powerful Patronus charm to ward them off. Alex and Harry fall unconscious, awakening in the infirmary with Dumbledore, Hermione, Kate, and Matt.

Learning that Black has been captured and sentenced to the Dementor's Kiss, Alex, Harry, Hermione, Kate, and Matt on Dumbledore's advice and use Hermione's Time-Turner, which she was given to attend several classes at once, to go three hours back in time. They see themselves reliving the night's events, and set Buckbeak free from execution. Spotting the past Alex, Harry, and Black being attacked by Dementors, Alex and Harry rescue them by using a Patronus Charm and realize that they were the unseen figures who saved them earlier. Alex, Harry, Hermione, Kate, and Matt free Black, who flies away on Buckbeak, still a fugitive without proof of his innocence. Alex, Harry, Hermione, Kate, and Matt return to the infirmary, rejoining their own timeline.

Exposed as a werewolf, Lupin resigns from teaching and returns the Marauder's Map to Alex and Harry. Black sends Alex and Harry Firebolt broomsticks, which they happily take on a ride.