In the 1930s, James Henry Trotter is a young boy who lives with his parents by the sea in the United Kingdom. On James' birthday, they plan to go to New York City and visit the Empire State Building, the tallest building in the world. However, his parents are later killed by a ghostly rhinoceros from the sky and finds himself living with his two neglectful aunts, Spiker and Sponge.
He is forced to work all day and they threaten him with beatings to keep him in line and taunt him about the mysterious rhino and other hazards if he tries to leave.
While rescuing a spider from being squashed by his aunts, James meets a mysterious man with a bag of magic green "crocodile tongues", which he gives to James to make his life better. The man instructs him not to lose the "tongues" and disappears. When James is returning to the house, he trips and the "tongues" escape into the ground.
This transforms a peach on a withered old tree into enormous proportions. Spiker and Sponge sell tickets to view the giant peach. Later on, James crawls inside a large hole he inadvertently creates in the peach, and he finds and befriends a group of life-size anthropomorphic bugs (Mr. Grasshopper, Mr. Centipede, Earthworm, Miss Spider, Mrs. Ladybug, and Glowworm). As they hear the aunts search for James, Mr. Centipede cuts the stem connecting the giant peach to the tree and the peach rolls away to the Atlantic Ocean.
Remembering his dream to visit New York City, James and the insects decide to go there with Mr. Centipede steering the peach. They use Miss Spider's silk to capture and tie a hundred seagulls to the peach stem, while battling against a giant robotic shark. Miss Spider reveals to James that she was the spider he saved from Spiker and Sponge. The next day, James and his friends find themselves in The Arctic; the Centipede has fallen asleep while keeping watch. After hearing Mr. Grasshopper wishing they had a compass, Mr. Centipede jumps off the peach into the icy water below and searches a sunken ship for a compass, but is taken prisoner by skeletal pirates. James and Miss Spider rescue him, and the journey continues.
As they reach New York City, a storm appears, along with the ghostly rhino. James is frightened but challenges the rhino and gets his friends to safety before the rhino strikes the peach with lightning; James and the peach fall to the city below, landing on top of the Empire State Building. After he is rescued by police officers, firefighters, and the largest crane in New York City, Spiker and Sponge arrive and attempt to claim James and the peach. James reveals Spiker and Sponge's abusive behavior towards him to the crowd, who gasp in shock at the revelation. Spiker and Sponge become enraged by James' betrayal and attempt to kill him. The bugs arrive and tie up Spiker and Sponge with Miss Spider's silk and both aunts are arrested. James introduces his friends to the New Yorkers and allows the children to eat up the peach.
The peach pit is made into a house in Central Park, where James lives happily with the bugs, who form his new family and also take important jobs in the city. James celebrates his 9th birthday with his new family.
In a post-credits scene, a new arcade game called "Spike the Aunts" is shown, featuring the rhino.