The word 'worm' has undergone one of the most dramatic semantic demotions in the history of English. Today it denotes a small, soft invertebrate living in soil. A thousand years ago, 'wyrm' (the Old English form) meant a serpent, a dragon, a snake, or any large sinuous creature. In Beowulf, the dragon that fatally wounds the hero in the poem's climax is repeatedly called a 'wyrm.' The modern English word 'worm' and the dragon of Anglo-Saxon legend are the same word.
The etymology traces to Old English 'wyrm' (serpent, snake, dragon, worm), from Proto-Germanic *wurmiz, from PIE *wr̥mis (worm, serpent). The PIE root is *wer- (to turn, to bend, to twist, to wind), making the worm/serpent 'the turning thing' or 'the twisting creature.' This root is enormously productive: it also gave English 'wrist' (the joint that turns), 'writhe' (to twist the body), 'wreath' (something wound in a circle), 'wrath' (originally a twisting of the face in anger), 'wrong' (twisted, crooked), 'wring' (to twist), and possibly 'wrap' (to wind around).
The Latin cognate 'vermis' (worm) produced a family of English words: 'vermicelli' (little worms — thin pasta), 'vermin' (originally worm-like pests), 'vermillion' (the brilliant red pigment, originally derived from the kermes insect, a 'little worm'), and 'vermifuge' (a substance that expels intestinal worms). The 'Vermeer' surname may derive from a Dutch word for lake or marsh rather than from 'worm.'
The semantic narrowing from 'dragon/serpent' to 'earthworm' occurred gradually during the Middle English period as Norse and French loanwords took over the larger meanings. 'Serpent' (from Latin) and 'snake' (from native Germanic) replaced 'wyrm' for snakes. 'Dragon' (from Latin 'dracō,' from Greek 'drákōn') replaced 'wyrm' for the mythological creature. By the 16th century, 'worm' had been demoted to its current sense — the smallest, most humble creature in the animal kingdom.
In Scandinavian languages, the cognate preserved its original meaning more faithfully. Swedish and Norwegian 'orm' still means 'snake.' Old Norse 'ormr' meant serpent or dragon, and it appears in the name of the mythological world-serpent Jörmungandr (literally 'huge monster'). The compound 'Lindworm' (from Old Norse 'linnormr,' a serpentine dragon) preserves the dragonish sense in English — a lindworm is a wingless, legless dragon.
The metaphorical uses of 'worm' in English reflect the word's diminished status. To 'worm one's way' means to crawl or insinuate oneself. A 'bookworm' is a person who burrows into texts. 'Can of worms' means a mess of hidden problems. All these metaphors rely on the smallness and baseness of the worm — a remarkable inversion for a word that once named the mightiest creature in Germanic mythology.