At the beginning of the book, Farmer Giles is the sort of person whom enjoys a slow, comfortable life, so when a deaf and rather simple giant crushes the farmers land, the last thing Giles dog, Garm, expects the farmer to do is get his gun and frighten the giant away, but is nonetheless very pleased when the farmer does just that, as are the villagers.
When Giles does battle with a dragon, Chrysophylax, and makes the dragon swear to bring all its gold to Ham, the king is intrigued, and leaves for Ham at once. The king arrives and claims the dragon's wealth as his own, although he promises a small “token” for the people of Ham. However, come the date when the dragon should return and the skies are empty. Giles sets of with some knights. However Chrysophylax disposes of them all but Giles, who recaptures the reptile, and then sets of for Ham.
The King is shocked that Giles does not return to court and marches against him, however Giles has tamed the dragon, which bests the Kings army, and Giles becomes king
Originally, Tolkien planed a sequel, the notes for which can be found in the 50th anniversary special edition of Farmer Giles of Ham