This poem was written in September 1789, and published in the third volume of James Johnson's Scots Musical Museum (1790). In this publication, at Burns's request, the poem was set to the music of "The Death of Captain Cook" by composer Jean-Baptiste Rochefort.