The village takes its name from Saint Margaret of Scotland, the wife of King Malcolm III of Scotland, who is said to have established the village to ensure there would be regular ferry crossings across the Firth of Forth for the benefit of pilgrims travelling to St Andrews. Margaret is said to have made her arrival in Scotland here in 1068, and to have regularly used the ferry crossing when travelling between the then capital Dunfermline, and Edinburgh Castle. From around this time, the crossing became known as the Queen's Ferry.