James Henry Trotter, four years old, lives with his loving parents in a pretty and bright cottage by the sea in the south of England. James's world is turned upside down when, while on a shopping trip in London, his mother and father are eaten by a rhinoceros that had escaped from the zoo. James is forced to go and live with his two horrible aunts, Spiker and Sponge, who live in a high, desolate hill near the white cliffs of Dover. For three years Spiker and Sponge physically and verbally abuse James, not allowing him to venture beyond the hill or play with other children. Around the house James is treated as a drudge, beaten for hardly any reason, improperly fed, and forced to sleep on bare floorboards in the attic.
One summer afternoon when he is crying in the bushes, James stumbles across a strange little man, who, mysteriously, knows all about James's plight and gives him a sack of tiny glowing-green crocodile tongues. The man promises that if James mixes the contents of the sack with a jug of water and ten hairs from his own head, the result will be a magic potion which, when drunk, will bring him happiness and great adventures. On the way back to the house, James trips and spills the sack onto the peach tree outside his home, which had previously never given fruit. The tree becomes enchanted through the tongues, and begins to blossom; indeed a certain peach grows to the size of a large house. The aunts discover this and make money off the giant peach while keeping James locked away. At night the aunts shove James outside to collect rubbish from the crowd, but instead he curiously ventures inside a juicy, fleshy tunnel which leads to the hollow stone in the middle of the cavernous fruit. Entering the stone, James discovers a band of rag-tag anthropomorphic insects, also transformed by the magic of the green tongues.
James quickly befriends the insect inhabitants of the peach, who become central to the plot and James' companions in his adventure. The insects loathe the aunts and their hilltop home as much as James, and they were waiting for him to join them so they can escape together. The Centipede bites through the stem of the peach with his powerful jaws, releasing it from the tree, and it begins to roll down the hill, squashing Spiker and Sponge flat in its wake. Inside the stone the inhabitants cheer as they feel the peach rolling over the aunts. The peach rolls through villages, houses, and a famous chocolate factory before falling off the cliffs and into the sea. The peach floats in the English channel, but quickly drifts away from civilization and into the expanses of the Atlantic Ocean. Hours later, not far from the Azores, the peach is attacked by a swarm of hundreds of sharks. Using the blind Earthworm as bait, the ever resourceful James and the other inhabitants of the peach lure over five hundred seagulls to the peach from the nearby islands. The seagulls are then tied to the broken stem of the fruit using spiderwebs from the Spider and strings of white silk from the Silkworm. The mass of seagulls does indeed lift the giant peach into the air and away from the sharks, although the peach is badly damaged in the incident.
As the seagulls strain to get away from the giant peach, they merely carry it higher and higher, and the seagulls take the giant peach great distances. The Centipede entertains with ribald dirges to Sponge and Spiker, but in his excitement he falls off the peach into the ocean and has to be rescued by James. That night, thousands of feet in the air, the giant peach floats through mountain-like, moonlit clouds. There the inhabitants of the peach see a group of magical ghost-like figures living within the clouds, "Cloud-Men", who control the weather. As the Cloud-Men gather up the cloud in their hands to form hailstones and snowballs to throw down to the world below, the loud-mouthed Centipede berates the Cloud-Men for making snowy weather in the summertime. Angered, an army of Cloud-Men appear from the cloud and pelt the giant peach with hail so fiercely and powerfully that the peach is severely damaged, with entire chunks taken out of it, and the giant fruit begins leaking its peach juice. All of this shrinks the peach somewhat, although because it is now lighter the seagulls are able to pull it quicker through the air. As the seagulls strain to get away from the Cloud-Men, the giant peach smashes through an unfinished rainbow the Cloud-Men were preparing for dawn, infuriating them even further. One Cloud-Man almost gets on the peach by climbing down the silken strings tied to the stem, but James asks the Centipede to bite through some of the strings. When he does a single freed seagull, to which the Cloud-Man is hanging from, is enough the carry him away from the peach as Cloud-Men are weightless.
As the sun rises, the inhabitants of the giant peach see glimmering skyscrapers peeking above the clouds, and a sprawling urban city far below them. The inhabitants of Manhattan see the giant peach suspended in the air by a swarm of hundreds of seagull, and panic, believing it to be a floating, orange-coloured, spherical nuclear bomb. The military, police, fire and rescue services are all called out, and people begin running to air raid shelters and the New York Subway, believing the city is about to be destroyed. A huge passenger airplane flies past the giant peach, almost hitting it, and severing the silken strings between the seagulls and the peach. The seagulls free, the peach begins to fall to the ground, but it is saved when it is impaled upon the spike at the top of the Empire State Building. The people on the observation deck at first believe the inhabitants of the giant peach to be monsters or Martians, but when James appears from within the skewered peach and explains his story, the people hail James and his insect friends as heroes. They are given a welcoming home parade, and James gets what he wanted for three long years - playmates in the form of millions of potential new childhood friends. The skewered, battered remains of the giant peach are brought down to the streets by steeplejacks, where its delicious flesh is eaten up by ten thousand children, all now James's friends. Meanwhile, the peach's other former residents, the anthropomorphic insects, all go on to find very interesting futures in the world of humans...
In the last chapter of the book, it is revealed that the giant hollowed-out stone which had once been at the center of the peach is now a mansion located in Central Park. James Henry Trotter lives out the rest of his life in the giant peach stone, which becomes an open tourist attraction and the ever-friendly James has all the friends he has ever wanted. Occasionally one of his friends visits: the Old-Green-Grasshopper would pop by and rest in the armchair by the fire with a brandy, or the Ladybug would pop in for a cup of tea and a gossip, or the Centipede to show off a new batch of particularly elegant boots that he had just acquired. Always imaginative and creative, James becomes a successful author, writing his story in James and the Giant Peach - "the book you have just read!"