According to Professor T. M. Devine in his book The Scottish Nation 1700 - 2000 (Penguin, 2001) the song was written as a temperance song. The song is found printed in a book, The American Songster, printed in the USA by W. A. Leary in 1845, and spread from Scotland to America from the Temperance movement. There is another USA printed version in the "Forget-Me-Not Songster" (c 1850), published by Locke. An alternative history of the song is suggested by the fact that a collection of ballads, dated between 1813 and 1838, is held in the Bodleian Library. The printer, Catnach, was based in the Seven Dials area of London. The Bodleian bundle contains "The Wild Rover". The Greig-Duncan collection contains no less than six versions of the song. It was compiled by Gavin Greig 1848–1917.