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. At the conclusion of one such late-night revel 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 Brig o' Doon.