Charlie Bucket lives with his parents and both sets of grandparents in a small wooden house on the edge of a town next to Willy Wonka’s huge chocolate factory. Charlie’s family is extremely poor. The house has only two rooms and one bed. Freezing cold drafts blow across the floor all winter, and everyone is always hungry. Charlie loves chocolate, but the family is only able to afford one chocolate bar a year, on his birthday. The situation, setting, social views, and other characteristics of the story (for example, the use of caricature "tag" names such as Slugworth, Prodnose, and Fickelgruber) are reminiscent of Charles Dickens’ work.
The plot is set into motion when Willy Wonka decides to allow five children in to see his factory. He hides five golden tickets inside the wrappers of five of his candy bars, and whoever finds one will get a tour of the factory and a lifetime supply of candy. Charlie’s only chance is to get the ticket in his birthday candy bar.
In the meantime, others are finding the tickets. The first ticket is found by Augustus Gloop, an enormously fat boy whose hobby is eating. The next to find a ticket is Veruca Salt, a rich girl whose father buys hundreds of thousands of candy bars and directs his factory workers to peel off the wrappers until a golden ticket is found. The third ticket is found by Violet Beauregarde, who normally chews gum but switches to the candy bars in the hope of striking it lucky. Once she finds the ticket, she switches back to gum. The fourth ticket is found by Mike Teavee, a nine-year-old boy who wants nothing more than to watch television. It seems that only spoiled children are finding the tickets (Charlie’s grandparents disapprove of them all). One ticket, however, remains to be found.
Grandpa Joe sneaks Charlie a dime he has been hoarding and tells Charlie to buy a candy bar. Once again, however, there is no ticket. The weather grows colder, and the family begins to starve. When Charlie finds a dollar bill in the snow, he decides to buy a candy bar and give the rest of the money to his mother. Yet, after enjoying one, he buys another; he finds the fifth golden ticket.
Grandpa Joe accompanies Charlie to the chocolate factory, where they meet the other four winners and their parents, and Willy Wonka leads them into the factory. Up to this point, though exaggeration, caricature, and a whimsical tone have been evident, the story has taken place in a realistic world. Once the tour of the chocolate factory begins, however, the story enters a world filled with what Roald Dahl calls magic. Willy Wonka fits the role of enchanter in his plum-colored, velvet tailcoat, bottle-green trousers, and pearly gray gloves.
He carries a gold-topped cane, sports a pointed black beard, and has marvelously bright eyes that sparkle and twinkle and laugh at all times. He talks endlessly and even dances at times during the tour. The reader senses that he seems to delight in the various punishments the children undergo as their greed and selfish actions get them into trouble.
The descriptions of the factory match those of enchanted places. A huge chocolate river, complete with waterfall, flows through the enormous chocolate room. Along the edge of it are buttercups and grasses that are actually made of a new soft sugar Willy Wonka has just invented. Across the river, the children can see small men, no taller than a person’s knee. These are the Oompa-Loompas (originally pygmies from Africa). Willy Wonka rescued this group of people from some terrible country where dangerous beasts—hornswogglers and snozzwangers and whangdoodles—would eat them, and now they work in his factory.
Once this stage has been set, the action begins in earnest. As Willy Wonka leads the visitors through the factory, one child after another disobeys Willy Wonka’s warnings and suffers a suitable fate. Finally, only Charlie and Grandpa Joe remain. Willy Wonka explodes with excitement because that means they have won. He rushes Charlie and Grandpa Joe into the elevator, and launches it right through the roof. Then he stops it, and they are able to see the other children going home. The children are all alive, though changed. Fat Augustus Gloop is now thin. Violet Beauregarde has been dejuiced and only has a purple face with which to contend. The Salt family is covered with garbage but otherwise okay. Mike Teavee has been stretched out to a ten-foot height. Willy Wonka pushes a button, and the elevator rises high over the town. Now comes the big surprise: Charlie is given the entire chocolate factory. The elevator is brought down through the roof of the house of Charlie’s family, the family is picked up into the elevator, and they all head for the factory.