The second instalment in the series, this magical fantasy thriller revolves around Harry Potter, a teenage magician who spends the summer without receiving letters from his Hogwarts friends. In his room, Harry meets Dobby, a house-elf who warns him bad things will happen if he returns to Hogwarts, and reveals he intercepted his friends' letters. Harry chases him downstairs, where Dobby destroys a cake. The Dursleys lock Harry up, but Ron, Fred and George Weasley rescue him in their father's flying Ford Anglia.
While buying school supplies, Harry and the Weasley family encounter Rubeus Hagrid and Hermione Granger, and they attend a book-signing by celebrity wizard Gilderoy Lockhart, who announces he will be the new Defence Against the Dark Arts teacher. Harry also encounters Draco Malfoy and his father Lucius, who slips a book in Ginny Weasley's belongings. When Harry and Ron are blocked from entering Platform Nine and Three-Quarters, they fly to Hogwarts in the Ford Anglia and crash into the hostile Whomping Willow. Ron's wand is damaged, and the car throws them out before driving off. They are allowed back into school but face detention.
While serving detention with Lockhart, Harry hears voices and later finds caretaker Argus Filch's cat, Mrs Norris, petrified, and a message written in blood announcing the Chamber of Secrets has been opened and threatening "enemies of the Heir". Professor McGonagall explains that one of Hogwarts' founders, Salazar Slytherin, supposedly constructed a secret Chamber and hid a monster that only his heir can control inside the Chamber, to purge the school of impure-blooded wizards and witches. More attacks occur over the course of the year. Harry and Ron suspect Malfoy is the Heir, so Hermione suggests they question him while disguised using polyjuice potion. Their makeshift laboratory is in abandoned toilets haunted by a ghost, Moaning Myrtle.
When Harry communicates with a snake, something Salazar Slytherin could do, some believe he is the Heir. At Christmas, Harry and Ron learn that Malfoy is not the Heir, but he mentions that a girl died when the Chamber was last opened fifty years before.
Harry finds an enchanted diary, owned by a former student named Tom Riddle, which shows him a flashback to fifty years before, where Riddle accused Hagrid, then a pupil, of opening the Chamber. When the diary disappears and Hermione is petrified, Harry and Ron question Hagrid. Professor Dumbledore, Cornelius Fudge, and Lucius Malfoy come to take Hagrid to Azkaban, but he discreetly tells the boys to "follow the spiders". Lucius has Dumbledore suspended.
In the Forbidden Forest, Harry and Ron find Aragog, who reveals Hagrid's innocence and that the dead girl was found in a bathroom. Aragog sets his colony of Acromantula on Harry and Ron, but the now-wild Ford Anglia saves them.
A book page in Hermione's hand reveals the monster is a basilisk, a giant snake that can instantly kill those who make direct eye contact with it; the petrified victims saw it indirectly. The school staff learn that Ginny was taken into the Chamber, and convince Lockhart to save her. Harry and Ron find Lockhart, revealed as a fraud, planning to flee; knowing Myrtle was the girl the Basilisk killed, they drag him to her bathroom and find the Chamber's entrance. Once inside, Lockhart uses Ron's damaged wand against them, but it backfires, wipes his memory, and causes a cave-in.
Harry enters the Chamber alone and finds Ginny unconscious and dying guarded by Tom Riddle. Harry realises Riddle is the Heir and he used the diary to manipulate Ginny and re-open the Chamber. Riddle then reveals his full name, Tom Marvolo Riddle, from which he created the anagram for his future new identity: "I am Lord Voldemort".
After Harry expresses support for Dumbledore, Dumbledore's phoenix Fawkes flies in with the Sorting Hat, and Riddle summons the Basilisk. Fawkes blinds the Basilisk, and the Sorting Hat eventually produces a sword with which Harry battles and slays the Basilisk, but he is poisoned by its fangs.
Harry defeats Riddle and revives Ginny by stabbing the diary with a basilisk fang. Fawkes' tears heal him, and he returns to Hogwarts with his friends and a baffled professor Lockhart. Dumbledore, reinstated as headmaster, praises them and orders for Hagrid's release.
Dumbledore shows Harry that the sword he wielded was Godric Gryffindor's own sword, and says he is different from Voldemort because he chose Gryffindor House. Harry accuses Lucius, Dobby's master, of putting the diary in Ginny's cauldron and tricks him into freeing Dobby. The Basilisk's victims are healed, and Hagrid returns to school.