It's in James Hogg's The Jacobite Relics of Scotland, second series (1821), pp. 90-92; pp. 301-302 (notes), as Song XLVIII: "Maclean's Welcome". Also in Greig's Scots Minstrelsie (vol.1), and others.