Farmer Giles of Ham is a comic medieval fable written by J. R. R. Tolkien in 1937 and published in 1949. The story describes the encounters between Farmer Giles and a wily dragon named Chrysophylax, and how Giles manages to use these to rise from humble beginnings to rival the king of the land. It is cheerfully anachronistic and light-hearted, set in Britain in an imaginary period of the Dark Ages. It features mythical creatures, medieval knights, and primitive firearms.
Scholars have noted that despite the story's light-hearted nature, reflected in Tolkien's playful use of his professional discipline, philology, it embodies several serious concerns. The setting is quasi-realistic, being the area around Oxford where Tolkien lived and worked. The story parodies multiple aspects of traditional dragon-slaying tales, and has roots in modern and medieval literature, from Norse myth to Spenser's Faerie Queene. Its concern for the "Little Kingdom" embodies Tolkien's environmentalism, in particular his well-founded fears for the loss of the countryside of Oxfordshire and surrounding areas.
Farmer Giles (Ægidius Ahenobarbus Julius Agricola de Hammo, "Giles Redbeard 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.