Margaret was not Scottish by birth; she was the daughter of Princess Agatha of Hungary and the Anglo-Saxon Prince Edward Atheling. She spent many a day of her youth in the court of her great-uncle, the English king, Edward the Confessor.
Her family fled from William the Conqueror and was shipwrecked off the coast of Scotland. King Malcolm befriended them and was captivated by the beautiful, gracious Margaret. They were married at the castle of Dunfermline, in 1070.
Malcolm was a good-hearted man, but he was quite rough and uncultured. Because of Malcolm’s love for Margaret, she was able to soften his temper, polish his manners and help him become a virtuous king. He left all domestic affairs to her and often consulted her in state matters.
Margaret was not only a queen, but a mother. She and her husband Malcolm had six sons and two daughters. Margaret personally supervised their religious instruction and other studies.
Although she was very much caught up in the affairs of the household and country, she remained detached from the world. She had certain times for prayer and reading Scripture. She ate sparingly, and slept little in order to have time for devotions. She and Malcolm kept two Lents, one before Easter and one before Christmas. During these times she always rose at midnight for Mass. On the way home she would wash the feet of six poor persons and give them alms. She was always surrounded by beggars in public and never refused them. It is recorded that she never sat down to eat without first feeding nine orphans and 24 adults.
In 1093, King William Rufus made a surprise attack on Alnwick castle. King Malcolm and his oldest son, Edward, were killed. Margaret, already on her deathbed, died four days after her husband.