The first chapter of Harry Potter and the Chamber of Secrets takes place as Harry is stuck spending the dreadful summer with the Dursleys, who are his sole remaining relatives. Dobby, a house-elf, pays Harry a visit as he is attending a dinner party that is being thrown by his uncle and aunt. Dobby urges Harry not to go back to Hogwarts, the magical school for wizards where Harry spent the previous school year. Harry attended Hogwarts. Dobby causes chaos in the kitchen, which infuriates the Dursleys, and Harry politely disregards the warning that was given to him. Harry is locked up in his room by the Dursleys for the remainder of the summer after they were angry with him. Fortunately, Harry’s good friend Ron Weasley abducts him in a flying automobile, and Ron takes Harry to his house for the remainder of the summer. There, Harry has a wonderful time.
When Harry is out with the Weasleys purchasing school supplies, he has two disastrous run-ins with other customers. When he first meets Lockhart, one of his professors, he is confronted by Lockhart’s insistence that he participate in a picture session with Harry. After that, Harry runs across Lucius Malfoy, the nefarious father of one of his adversaries, who comes dangerously close to starting a fight with Mr. Weasley. As Harry gets ready to head back to Hogwarts, he discovers that he and Ron are unable to board the magically invisible train platform. As a result, they have to take the Weasley vehicle to get to Hogwarts instead. They make a hasty landing, which results in detentions for both of the boys. Harry receives a lecture from Lockhart, who is of the opinion that Harry flew the automobile in order to attract attention.
Quidditch training has begun, and Draco Malfoy has been selected to represent Slytherin as the new seeker. He insults Hermione’s Muggle origins by referring to her as a “mudblood” when they are playing the game. After making fun of Hermione, Draco is viewed as a possible suspect when, on Halloween night, someone writes a threatening letter and terrifies the cat that belongs to the school caretaker. Harry is startled on two separate occasions by a creepy voice just before the cat is attacked. He first hears it while he is in custody, and then he hears it again while he is at a party, just before the cat is attacked. Concern can be heard across the entire school. After doing some digging, Harry, Ron, and Hermione discover that a student was murdered at Hogwarts fifty years ago when someone unsealed a chamber in the castle.
Quidditch match between Gryffindor and Slytherin was won by Harry, who was representing Gryffindor. During the course of the game, Harry is struck by an enchanted ball, which results in the breakage of several bones in his arm. Dobby, a house elf, has cast a spell on the ball in the hopes that it will harm Harry and force him to return home. On that same night, Harry witnesses the arrival of the petrified body of a first-year student at the medical facility. Almost immediately after that, Lockhart starts a duelling club. When the pupils first get together, Harry horrifies them all by speaking in Parseltongue to a snake. Because only the heir of Slytherin, who is tasked with opening the chamber, would have the capacity to communicate with snakes, the other students’ reaction to Harry’s ability is one of apprehension. When Harry discovers the petrified bodies of Justin Finch-Fletchley and Nearly Headless Nick, he draws even more attention to himself and draws additional suspicion from others.
Ron, Harry, and Hermione are so determined to find out who is responsible for the theft that they concoct a potion called Polyjuice. They were able to question Malfoy about the Chamber of Secrets after drinking the potion, which gave them the bodies of Slytherin students. They come to the conclusion that Malfoy is not the rightful heir to the Slytherin title. After a period of time during which there are no further attacks, Harry discovers a diary in the damaged toilet just before Valentine’s Day. The diary was written by a ghost with the moniker Moaning Myrtle who was seen lurking in the ladies’ room. Harry adds entries to the journal, and the diary then answers with new entries. In the course of this conversation, Harry meets Tom Riddle, the young man who, many years before, accused Hagrid of being the one who opened the Chamber of Secrets.
Hermione and another student from Ravenclaw have suddenly become petrified. Harry and Ron leave the castle in order to question Hagrid outside the grounds. Dumbledore and Hagrid are removed from Hogwarts by the Minister of Magic, Cornelius Fudge, and Lucius Malfoy before they can reach Hagrid. As Hagrid is being led away, he advises Harry and his friends that they can learn more about the Chamber monster if they follow the spiders. After a few more sleepless nights, Harry and Ron finally manage to enter the Forbidden Forest in order to track the spiders. They come to the conclusion that the monster that killed the girl fifty years ago was not a spider, that the body of the girl was discovered in a bathroom, and that Hagrid is not guilty of the crime. A colony of enormous spiders comes dangerously close to killing the lads. As they run away, Harry and Ron come to the conclusion that the girl who was killed by the creature must have been Moaning Myrtle.
A few days later, Ron and Harry find a piece of paper in Hermione’s frozen hand. On the paper is a description of a basilisk. They come to the conclusion that the monster in the Chamber is a basilisk. The teachers make an announcement that Ginny Weasley has been brought into the room just as the boys are about to take action based on the information they have gained. Through a concealed entrance in Myrtle’s toilet, Ron, Harry, and Lockhart get access to a network of underground tunnels. When Lockhart accidentally puts a curse on himself, Ron assists him while Harry and the others walk away from them. After entering the Chamber of Secrets, Harry comes face to face with Ginny’s lifeless body as well as Tom Riddle. Ginny had been completely captivated by Tom, who is revealed to be a younger version of Voldemort who has been writing in his journal. Harry makes a plea for assistance to Dumbledore. A phoenix and a wizard’s cap make their entrance. Tom calls forth a basilisk, but the Phoenix pierces both of the basilisk’s eyes. Harry is able to put an end to the colossal snake with the sword that emerges from his hat. Tom’s writings are obliterated when Harry pierces the diary with a fang from a basilisk. Ginny comes to and awakes.
Dumbledore asks Harry about his adventure, and Harry tells him about it. When Lucius Malfoy bursts into the office with his house-elf, Dobby, Harry Potter tricks Lucius into giving Dobby a sock, which allows Harry to escape Dobby from his captivity. As the students leave for their summer holidays, everything in the castle is running smoothly as usual.