While home with the Dursleys for the summer, Harry Potter (Daniel Radcliffe) is not getting any mail from his friends, Ron (Rupert Grint) and Hermione (Emma Watson). On his twelfth birthday (July 31) Harry is visited by Dobby, a house-elf, who warns Harry that he will be in mortal danger if he returns to Hogwarts. Harry ignores Dobby's warning and is determined to return. It turns out that Dobby has been collecting Harry's letters to make it seem as though his friends had forgotten him, hoping Harry might then not want to return to Hogwarts. Seeing that he will have to use force, Dobby decides to destroy, by the use of a charm, a large cake that Aunt Petunia (Fiona Shaw) has baked for an important dinner party attended by Vernon Dursley's (Richard Griffiths) boss and his wife. Harry is blamed by the Ministry of Magic for Dobby's charm, and is told that if he does magic outside school again, he will be expelled. On learning that Harry cannot perform magic outside school, the Dursleys, previously fearful of his wizarding, lock Harrys books and wand away and Vernon Dursley fits bars onto his bedroom window, making Harry a prisoner.
A few days later, Fred, George (James and Oliver Phelps) and Ron Weasley come to his rescue in their father's enchanted Ford Anglia. After a pleasant summer together in the Weasley house, everyone heads to Platform 9¾ to take the Hogwarts Express back to school. To their shock, Harry and Ron are unable to enter the barrier between platforms 9 and 10. In desperation, they fly to Hogwarts in the car, crashing into the Whomping Willow and damaging Ron's wand. The semi-sentient car ejects them and their belongings and disappears into the Forbidden Forest.
Harry soon finds he is the unwanted centre of attention of three people: the vain new Defense Against the Dark Arts Professor, Gilderoy Lockhart (Kenneth Branagh), admirer Colin Creevey (Hugh Mitchell), and Ron's sister, Ginny Weasley (Bonnie Wright), who fancies Harry. Events take a turn for the worse when the Chamber of Secrets is opened and a monster stalks the castle, with the power literally to petrify several students. According to legend, the Chamber was built by Salazar Slytherin and can only be opened by his heir, in order to purge Hogwarts of students who are not pure-blood wizards. Many suspect Harry is the Heir of Slytherin, especially after he inadvertently speaks Parseltongue (the language of snakes), a rare ability Harry gained after Voldemort's murderous attack upon him when he was an infant.
Harry, Ron, and Hermione attempt to discover the Heir of Slytherin's true identity. Using Polyjuice Potion brewed by Hermione, they disguise themselves as Slytherin students, Crabbe (Jamie Waylett) and Goyle (Josh Herman), hoping to learn from Draco Malfoy (Tom Felton) the identity of the Heir. Malfoy, they learn, does not know who the Heir of Slytherin is, but he inadvertently provides Harry and Ron with an important clue about the Chamber of Secrets.
Unfortunately, the hair that Hermione took from Millicent Bullstrode's uniform was from a cat, and as the polyjuice potion is only intended for human transformations she assumes a feline appearance; it takes a little more than a month to restore her normal human form. She is released from the hospital wing in early February, her normal appearance restored.
The attacks increase throughout the year, petrifying more students, including Hermione. Most horribly, a message written on a wall declares that Ginny Weasley has been taken into the Chamber, where "her skeleton will lie forever".
With the help of Ron and Moaning Myrtle (Shirley Henderson), Harry discovers the entrance to the Chamber of Secrets. They force Gilderoy Lockhart, a fraud who wipes clean other wizards' memories and claims their achievements, to go with them. Once they find the entrance to the Chamber, Lockhart attempts to use Ron's broken wand to erase Harry and Ron's memories, but the spell backfires on to himself and brings the ceiling caving in, separating Harry from Ron and Lockhart. Lockhart revives, but has now lost his own memory.
Harry makes it to the Chamber where he finds an unconscious Ginny. He also meets a young man named Tom Riddle, who claims to be a "memory". Harry learns that Ginny, under the control of Lord Voldemort, opened the Chamber. Voldemort, whose real name is Tom Marvolo Riddle (the anagram of which is "I am Lord Voldemort"), imprinted his memory in an enchanted diary, in order to one day continue the work he began when he reopened the Chamber fifty years ago ridding Hogwarts of non-pureblood witches and wizards. It was Hagrid, a Hogwarts student at the time, who was blamed for the attacks and expelled.
Tom Riddle's memory grows more powerful as it steals life from Ginny's body, and it tries to kill Harry by setting loose a basilisk (the monster responsible for petrifying the students). But Dumbledore's (Richard Harris) phoenix, Fawkes, arrives carrying the Sorting Hat, from which Harry draws out the sword of Godric Gryffindor. Fawkes blinds the basilisk, destroying its fatal gaze, and Harry slays it with the sword. In attempting to slay the basilisk Harry's arm has been pierced by the creature's fang. Harry stabs the diary with one of the basilisk's fangs, and the memory of Riddle is destroyed, while Ginny revives from her near-death state. Harry seems to be dying quickly from the venom but Fawkes comes to heal Harry with his tears (phoenix tears have healing power). Ginny and Harry both recover fully, along with those who were petrified: Hermione, Mrs Norris, Justin Finch-Fletchley, Nearly Headless Nick (John Cleese), and Colin Creevey.
Harry realizes it was Lucius Malfoy (Jason Isaacs), Draco Malfoy's father, who slipped the diary into Ginny's cauldron when he encountered the Weasleys in a Diagon Alley bookshop, but he is unable to prove it. Dobby reveals he is the Malfoys' servant, and knowing their treachery, had been trying to protect Harry all year. In gratitude, Harry sticks one of his old socks into the diary and hands it to Lucius. Lucius throws away the diary, but Dobby catches it and finds the sock hidden in its pages. This constitutes, in Dobby's eyes, a gift of clothing the traditional manner in which a master frees a house-elf from servitude. The freed Dobby declares he is eternally grateful to Harry and protects him from an attempted reprisal from Lucius. The word "Avada" is used as the beginning of Lucius Malfoy's curse, suggesting that it is the Avada Kedavra (the killing curse).
Dumbledore dispels Harry's fears that he could have been put into Slytherin rather than into Gryffindor when he tells Harry that it is his choices that define him and not his abilities, and that Harry could not have wielded the sword of Gryffindor if he did not truly belong to that house.