Harry Potter is at the Dursleys' for the summer, spending his time studying new spells undercover. When Uncle Vernon's sister, Marge, comes for a visit and infuriates Harry by insulting his parents, he accidentally causes her to inflate and fly away. Harry loses his temper and threatens to curse Vernon but flees, fed up with his life at Privet Drive. The Knight Bus appears and delivers Harry to the Leaky Cauldron, where Minister of Magic Cornelius Fudge tells him he will not be arrested. During the summer, his friends Ron Weasley and Hermione Granger go to the Leaky Cauldron too. Harry also learns that Sirius Black, a convicted supporter of Lord Voldemort, has escaped Azkaban prison and is likely intending to kill Harry.
Harry, Ron, and Hermione head back to school on the Hogwarts Express. They unknowingly share a compartment with the new Defense Against the Dark Arts teacher, Remus Lupin, who is sleeping. When the train abruptly stops, Dementors (the guards of Azkaban) board, searching for Black. Harry faints when one Dementor enters their compartment, but Lupin repels it with a charm, but before Harry faints, he hears a woman screaming. He asks who screamed, but they say no one screamed.
At Hogwarts, Albus Dumbledore informs students that the Dementors will be guarding the school while Black is at large. Professor Lupin is introduced, andHagrid is announced as the new Care of Magical Creatures teacher. Lupin's lessons prove enjoyable; he focuses on practice, not just theory, and encourages less confident students such as Neville. However, Hagrid's first class goes awry when Draco Malfoy deliberately provokes the Hippogriff,Buckbeak, who then attacks him. Draco's father Lucius Malfoy has Buckbeak sentenced to death on court.
Later on, they arrive at the door of their dormitory, full of crowd. They found a empty picture cut off, and The Fat Lady is nowhere to be found. They found her several pictures upstairs, and she tells Dumbledore that Black entered the castle. Finch, Lupin and Snape secure and search the castle, but they find no one. Gryffindor students are currently sleeping in the main hall. Snape is arguing with Dumbledore about the security, and he suspects Lupin. He also warns him when will they tell Potter, but he says that he will do that when the time comes.
During a Quidditch match, several Dementors approach Harry. He tries to escape them, but they overpower him, causing him to fall off his broomstick, which is destroyed by the Whomping Willow. Lupin teaches Harry to defend himself against Dementors with a Patronus charm. Because Harry lacks parental permission to visit Hogsmeade, Fred and George (who intercept him despite his invisible cloak due to his footprints in the snow) give him their Marauder's Map, a magical document showing every person's location within Hogwarts, as well as secret passageways in and out of the school castle. At Hogsmeade, Harry notices Fudge and Madam Rosmerta, and they are speaking about Black. He follows them after he hears mentioning his name. Ron and Hermione stay outside. Harry overhears that Black is his godfather and was his parents' best friend. Black was accused of divulging the Potters' secret whereabouts to Voldemort and murdering their mutual friend Peter Pettigrew by blowing him up. Harry vows to kill Black.
In late night, Harry is reading the Marauder's map, when he notices Peter Pettigrew's name on it. He exits the dormitory and follows him. He follows Pettigrew, and notices that he is in front of him. He cannot see him cause of charm's weak light, but Pettigrew is getting closer. He passes next to him, but Harry doesn't see anyone. He spots Snape on the map, and tries to escape, but Snape catches him. Snape takes the Map, but he doesn't find anything because he doesn't know the password. Just as Snape is going to take him, Lupin shows up. He takes him to his classroom, arguing on him because he has this map while Black is at large. He admits that he is the one of Map's creators. He instructs Harry to go to his dormitory.
As Harry is leaving his Divination final exam, Professor Trelawney enters a trance and predicts that the Dark Lord's servant will return that night. Later, Harry, Ron, and Hermione visit Hagrid to console him over Buckbeak's impending execution. While there, they discover Scabbers, Ron's missing rat. Fudge, Dumbledore, and an executioner arrive at Hagrid's to carry out Buckbeak's execution, and the three students hurry away to avoid being discovered. Scabbers suddenly bites Ron and escapes, the trio chase him. A large dog appears and drags both Ron and Scabbers into a hole at the Whomping Willow's base. Harry and Hermione are attacked by the tree but manage to enter the underground passage to the Shrieking Shack.
There they discover that the dog is actually Sirius Black, who is an Animagus. Harry attacks Black, but Lupin arrives and disarms Harry. After exchanging a few cryptic words with Black, Lupin then embraces him as an old friend. When confronted by Hermione, Lupin admits to being a werewolf, and he and Black begin to explain that Black is innocent. Professor Snape bursts in, intending to hand over Black to the Dementors, but Harry, having begun to believe Lupin and Black, knocks him out with a spell. Lupin and Black explain that Scabbers is actually Peter Pettigrew, an Animagus who committed the crime for which Black was convicted.
Lupin and Black force Pettigrew back into his human form preparatory to killing him, but Harry intervenes saying that his father, James Potter, would not have wanted his two best friends to become killers. Pettigrew was then to be turned over to the Dementors. As the group heads to the castle, the full moon rises; Lupin transforms into a werewolf, and Pettigrew manages to escape. Lupin and Black fight in their animal forms, until Lupin is distracted by another animal's howls. Dementors attack Black and Harry. As Dementors are preparing to suck out their souls & perform the Dementor's Kiss, Harry sees a distant figure cast a powerful stag-shaped Patronus that scatters the Dementors. Harry believes the mysterious figure is his dead father.
Harry passes out from the trauma, and awakens to find he is in Hogwarts and Sirius was captured. Acting on advice from Dumbledore, Hermione reveals that she possesses a time-turner that she has used all year to take multiple classes simultaneously. She and Harry travel back in time three hours, watching themselves repeat that night's events. They free Buckbeak, and return to the Whomping Willow. As the Dementors descend to attack Black and his "other" self & prepare the Dementor's Kiss from the previous events, Harry realises that he himself was the one to cast the Patronus, and rushes to do so to prevent his other self from experiencing the Dementor's Kiss & remove his own existence. Harry and Hermione rescue Black, who escapes on Buckbeak. Lupin resigns the next day, knowing that parents will object to a werewolf teaching their children. Shortly after, Black sends Harry a Firebolt, the fastest racing broom ever made.