Farmer Giles ( Ægidius Ahenobarbus Julius Agricola de Hammo , "Giles Bronze-beard Julius Farmer of Ham") is not a hero. He is fat and red-bearded and enjoys a slow, comfortable life. But a rather deaf and short-sighted giant blunders on to his land, and Giles manages to ward him away with a blunderbuss shot in his general direction. The people of the village cheer: Farmer Giles has become a hero. His reputation spreads across the kingdom, and he is rewarded by the King with a sword named Caudimordax ("Tailbiter")—which turns out to be a powerful weapon against dragons.
The giant, on returning home, relates to his friends that there are no more knights in the Middle Kingdom, just stinging flies—actually the scrap metal shot from the blunderbuss—and this entices a dragon, Chrysophylax Dives, to investigate the area. The terrified neighbours all expect the accidental hero Farmer Giles to deal with him.
The story parodies the great dragon-slaying traditions. The knights sent by the King to pursue the dragon are useless fops, more intent on "precedence and etiquette" than on the huge dragon footprints littering the landscape. The only part of a 'dragon' they know is the annual celebratory dragon-tail cake. Giles by contrast clearly recognises the danger, and resents being sent along to face it. But hapless farmers can be forced to become heroes, and Giles shrewdly makes the best of the situation.
It has been suggested that the Middle Kingdom is based on early Mercia, and that Giles's break-away realm (the Little Kingdom) is based on Frithuwald's Surrey.