"Tam O' Shanter" is a narrative poem written by the Scottish poet Robert Burns in 1790. First published in 1791, it is one of Burns's longer poems, and employs a mixture of Scots and English.
The poem describes the habits of Tam, a farmer who often gets drunk with his friends in a public house in the Scottish town of Ayr, and his thoughtless ways, specifically towards his wife, who is waiting at home for him, angry. After one such revel, late night after a market day, Tam rides home on his horse Meg while a storm is brewing. On the way he sees the local haunted church lit up, with witches and warlocks dancing and the devil playing the bagpipes. He is still drunk, still upon his horse, just on the edge of the light watching: amazed to see the place bedecked with many gruesome things such as gibbet irons and knives that had been used to commit murders and other macabre artifacts.
The witches are dancing as the music intensifies and, upon seeing one particularly wanton witch in a short dress he loses his reason and shouts,`Weel done, cutty-sark!' (cutty-sark : "short shirt"). Immediately, the lights go out, the music and dancing stops and many of the creatures lunge after Tam, with the witches leading. Tam spurs Meg to turn and flee and drives the horse on towards the River Doon as the creatures dare not cross a running stream. The creatures give chase and the witches come so close to catching Tam and Meg that they pull Meg's tail off just as she reaches the bridge over the Doon. The name is probably based on the Scottish forename "Tam" followed by "mishanter" (misfortune, ill-luck, the devil).
The British clipper ship Cutty Sark was named after this poem. The ship was named after Cutty-sark, the nickname of the witch Nannie Dee in Robert Burns' 1791 poem Tam O' Shanter. The ship's figurehead, the original carved by Robert Hellyer of Blackwall, is a stark white carving of a bare-breasted Nannie Dee with long black hair holding a grey horse's tail in her hand. In the poem she wore a linen sark (Scots: a short chemise or undergarment), that she had been given as a child, which explains why it was cutty, or in other words far too short. The sight of her dancing in such a short undergarment caused Tam to cry out "Weel done, Cutty-sark", which subsequently became a well known catchphrase.
Originally, carvings by Hellyer of the other scantily clad witches followed behind the figurehead along the bow, but these were removed by Willis in deference to 'good taste'. Tam O' Shanter riding Meg was to be seen along the ship's quarter. The motto, Where there's a Willis away, was inscribed along the taffrail. The Tweed, which acted as a model for much of the ship which followed her, had a figurehead depicting Tam O' Shanter.
The Tam O' Shanter (in the British military often abbreviated TOS or Tam) is also a 19th-century nickname for the traditional Scottish bonnet worn by men. It is named after "Tam O' Shanter", the eponymous hero of the poem by Robert Burns, of 1790.