It's a sad song (what folk song isn't) sung by Mary Hamilton who is to be hanged in the morning. Wikipedia explains it this way.
The four Marys were Mary, Queen of Scots' ladies-in-waiting, but these were Mary Seton, Mary Beaton, Mary Fleming and Mary Livingston. There was no Mary Carmichael but this popular song was believed to be relating to Mary, Queen of Scots until it was traced back to the court of the Tsar. The ballad dates between 1719 and 1764 and narrates the story of Mary Hamilton, a Scottish maid of Peter the Great's wife Catherine, who was executed for the murder of her illegitimate child, product of an affair with the Tsar Peter.
The two stories of Mary Hamilton and Mary, Queen of Scots were grafted onto each other.
I didn't realize, that songs, like plays and stories also changed to suit the situation. So what might have started as a melody with Russian lyrics, was changed, when translated into English. The courts changed, the monarchies changed, what never seemed to change was the name "Mary."
It makes me wonder how many other songs began as someone else's story, but were updated to make them relevant today. Here is the song from Youtube. (It was also sung by Joan Baez). My husband calls folk songs - music to commit suicide by!
Well life was/is difficult and music, however sad, is a way of coping. Please post any interesting updates in books, music and art, that you know. We all cope on a daily basis.
Have a great day!!