Charlie Bucket, the novel’s protagonist, is a little boy who lives with his parents, Mr. Bucket and Mrs. Bucket, and both sets of grandparents (Grandma Georgina, Grandpa George, Grandma Josephine, and Grandpa Joe), who spend all their time lying in the one bed the family can afford. The Bucket family is extremely poor, as Mr. Bucket is the only one who’s employed. They live in a tiny, drafty two-room house and subsist on cabbage and potatoes. What Charlie wants most in the world is chocolate—so his walk to and from school every day is torturous, as he has to pass Mr. Wonka’s chocolate factory each way.
Every night, Charlie’s grandparents tell him stories. One night, Grandpa Joe tells Charlie about Mr. Wonka and his chocolate factory. Mr. Wonka is a genius inventor—he once made a palace entirely out of chocolate for an Indian prince. His factory used to employ local workers, but Mr. Wonka suddenly shut the factory down when spies kept stealing his candy recipes. After a closure of several years, the factory suddenly came to life again and resumed production. Nobody knows who works there, as the gates are perpetually locked; Mr. Wonka and his factory are totally mysterious.
One evening, Mr. Bucket comes home with a newspaper bearing exciting news: Mr. Wonka has hidden five Golden Tickets in five Wonka candy bars. The children who find the Golden Tickets will have the opportunity to tour his factory. Within days, two children—the extremely fat Augustus Gloop and a wealthy, spoiled girl named Veruca Salt—find two Golden Tickets. When Charlie’s birthday arrives soon after, he receives a Wonka bar, though it doesn’t contain a ticket. In the weeks after, a gum-chewing girl named Violet Beauregarde finds a ticket, as does a boy named Mike Teavee, who’s obsessed with watching television. The Bucket family agrees that all four of the children who found tickets are horrible. Grandpa Joe gives Charlie a saved dime to buy another Wonka bar for another chance at a Golden Ticket, but the bar doesn’t have a ticket.
In the months that follow, the Bucket family starts to starve. It’s a bitterly cold winter, which makes it hard to keep warm—and to make matters worse, Mr. Bucket loses his job at the toothpaste factory. Then, one day after school, Charlie finds a dollar bill in the gutter. This means that he can buy food for his family—but he decides to buy himself a Wonka bar first. The bar contains only chocolate, but when Charlie buys a second bar, he finds a Golden Ticket inside. When Charlie tells his family, Grandpa Joe leaps out of bed for the first time in 20 years. The family agrees that Grandpa Joe should accompany Charlie to the factory for the tour tomorrow.
The next morning, Charlie and Grandpa Joe stand quietly near the other ticket winners, whose parents have to restrain them so that they don’t climb over the gates. Finally, Mr. Wonka opens the gates and ushers them inside. He leads them into his chocolate room, which looks like a beautiful landscape. Everything in the underground room is edible, from the meadows to the trees—and the wide, rushing chocolate river.
Mr. Wonka then introduces the party to his workers, the Oompa-Loompas, who are knee-high people from Loompaland. Mr. Wonka convinced them to come work in his factory after discovering that the Oompa-Loompas lived in constant danger in Loompaland and couldn’t get ahold of the one food they crave: cacao beans, which are what chocolate is made of. They love to sing, and they’re always laughing.
Mr. Wonka breaks off his explanation as greedy Augustus Gloop begins to drink from the chocolate river and then falls in. Massive glass pipes suck him up, though Augustus barely fits. Several Oompa-Loompas lead Augustus’s parents to find him and keep him from getting made into fudge, while other Oompa-Loompas sing the remaining children a song condemning Augustus for his greed and his weight.
When the song is over, Mr. Wonka ushers the party into a boat made of candy. They rush down the chocolate river to Mr. Wonka’s secret Inventing Room. He shows off his in-progress candies, including a gum that provides the chewer with a three-course meal. Violet Beauregarde, the gum-chewer, can’t resist snatching it from Mr. Wonka, even though he tells her not to. She thoroughly enjoys the first two courses but turns blue and expands like a blueberry when she gets to the dessert course. Oompa-Loompas roll her away to juice her while others sing a song about how nasty it is to chew gum all the time.
Next, Mr. Wonka shows Charlie, Veruca, Mike, and their guardians a room where trained squirrels shell walnuts and check for “bad nuts.” Veruca, who’s very spoiled, wants one and rushes into the room to snatch a squirrel. But instead, the squirrels hold her down, decide she’s a “bad nut,” and toss her down the garbage chute. When Veruca’s parents go into the room after her, the squirrels shove them into the garbage chute, too. This time when the Oompa-Loompas sing, they acknowledge that spoiled kids are horrible—but spoiled kids, they insist, are the way they are because their parents make them that way.
Finally, Mr. Wonka leads the remaining children and adults to an elevator that moves in every direction. Tired, Mike wants to watch television, so Mr. Wonka hits a button that takes them to a room where he’s developing Television Chocolate. He has a special camera that takes a mattress-sized chocolate bar and transmits it into a television—where viewers can take it out and eat it. Excited to be the first person to be transmitted by television, Mike throws himself in front of the camera. He appears in the television a minute later, but he’s only an inch tall. Oompa-Loompas lead Mike’s parents away to the gum-stretching machine, which they’ll attempt to use to return Mike to his normal size. Oompa-Loompas then sing another song, this time insisting that television rots kids’ brains. According to the Oompa-Loompas, kids are better off reading books.
Once Mr. Wonka, Charlie, and Grandpa Joe are back in the elevator, Mr. Wonka realizes that Charlie is the only child left. Mr. Wonka reveals that Charlie won: the Golden Tickets and the tour were a way for Mr. Wonka to select a child to inherit the factory and keep it running once he’s gone. He presses a button that causes the elevator to burst out of the factory roof. After watching the other Golden Ticket winners leave the factory (all of whom have been squeezed, juiced, or stretched to make them either their original size or thinner), Mr. Wonka flies the elevator to the Buckets’ house and in through the roof. After Charlie and Grandpa Joe explain to the family what’s happening and that they’ll now get to live in the chocolate factory, they push the grandparents’ bed into the elevator. Mr. Wonka and the Bucket family then fly through the air in the elevator, headed for the factory.