The book starts with a young girl named Sophie lying in bed in an orphanage after her parents died in a car accident. She can't sleep, and sees a strange sight in the street; a giant man, carrying a bag and an odd trumpet. He sees Sophie, who tries to hide in bed, but the giant picks her up through the window. Then he runs incredibly fast to a large cave, which he enters.
When he sets Sophie down, she begins to plead for her life, believing that the giant will eat her. The giant laughs, and explains that most giants do eat human beings, and that the people's origins affect their taste. For example, people from Greece taste greasy, while people from Panama taste of hats. The giant then says that he will not eat her, as he is the BFG, or the Big Friendly Giant.
The BFG explains that she must stay with him forever, as no one can know of his existence. He warns her of the dangers of leaving his cave, as his nine neighbours are sure to eat her if they catch her. He explains what he was doing with the trumpet and suitcase. He catches dreams, stores them in the cave, and then gives the good ones to children all around the world. He destroys the bad ones. The BFG then explains that he eats the only edible plant that will grow in the giants' homeland: snozzcumbers, which are disgusting striped warty cucumber-like vegetables with wart-like growths that taste like frog skins and rotten fish to Sophie and cockroaches and slime wanglers to the BFG. Another giant, the Bloodbottler, then storms in. Sophie hides in a snozzcumber and is nearly accidentally eaten by the Bloodbottler. Bloodbottler luckily spits her out and then leaves in disgust. When Sophie announces she is thirsty, the BFG treats her to a fizzy soda pop drink called "frobscottle" which causes noisy flatulence because of the bubbles sinking downwards. The BFG calls this "Whizzpopping". The next morning, the BFG takes Sophie to Dream Country to catch more dreams, but is tormented by the man-eating giants along the way, notably by their leader the Fleshlumpeater, the largest and most fearsome of the giants.
In Dream Country, the BFG demonstrates his dream-catching skills to Sophie; but the BFG mistakenly captures a nightmare and uses it to start a fight among the other giants when Fleshlumpeater has a nightmare about Jack. Sophie later persuades him to approach the Queen of England about imprisoning the other giants. To this end, she uses her knowledge of London to navigate the BFG to Buckingham Palace, and the BFG creates a nightmare for the Queen, which describes the man-eating giants, and leaves Sophie in the Queen's bedroom to confirm it. Because the dream included the knowledge of Sophie's presence, the Queen believes her and speaks with the BFG.
A fleet of helicopters then follows Sophie and the BFG to the giants' homeland, where the giants are tied up as they sleep, and the helicopters carry them back to London where they are imprisoned in a 500 ft deep pit with sheer walls and a high safety fence. The BFG is lowered in to untie them; untying Fleshlumpeater last, he explains why they are being imprisoned. Outraged, Fleshlumpeater roars that they'll devour the BFG instead, but he is hoisted out to safety. The man-eating giants find themselves being only fed snozzcumbers.
Afterwards, a huge castle is built as the BFG's new house, with a little cottage next door for Sophie. While they are living happily in England, gifts come from the governments of every country ever targeted by the giants (notably England, Sweden, Arabia, India, Panama, Tibet, Jersey, Chile, and New Zealand). After Sophie teaches the BFG how to read and proper English, he writes a book of their adventures identified as the novel itself—under the name "Roald Dahl".