The Journal of the [English] Folk-Song Society, Vol. 7, No. 27 (1923) explains that this song took several forms throughout Scotland and England, sharing kinship with The Bold Pirate. The source is Ford's Vagabond Songs and Ballads of Scotland, 1898, which gives a clear English transcription and description:
According to a popular tradition, this plaintive ballad, which has been an established favorite with the country people of Scotland for several generations, though seldom printed in the collections, was composed about the beginning of last century [early 1700s] by a young lady in Galloway, whose husband was drowned in the course of a voyage to Holland. It may, however, as Mr. George Eyre-Todd shrewdly suggests, belong to an earlier period, when Scottish knights, in times of peace at home, were accustomed, as soldiers of fortune, to carry their swords and followers to the wars in the Low Countries. Its original air, from which Miss Admiral Gordon's Strathspey was made, is preserved in the "Caledonian Pocket Companion."
Notes from Frank Shay:
Most recorded versions of this song begin with "On the night that I was married"... The origins of this version remain to be determined. Martin Carthy and Dave Swarbrick perform the song on Second Album (1966). The Iron Horse have a very musical recording on Five Hands High (1994).