She was the daughter of King Eric II of Norway and Margaret, daughter of King Alexander III of Scotland. Margaret was born in Tønsberg. Her mother died in childbirth.
When the treaty arranging the marriage of Margaret and Eric was signed at Roxburgh on 25 July 1281, Alexander III's younger son David had already died, in June 1281, leaving the King of Scots with only one legitimate son, Alexander. Consequently, the treaty included a provision for the children of Margaret and Eric to succeed to the kingdom of the Scots:
If it happens that the king of Scotland dies without a lawful son, and any of his sons does not leave lawful issue [not sons] and Margaret has children [not sons] by the king of Norway, she and her children shall succeed to the king of Scotland ... or she, even if she is without children, according to Scottish law and custom.
Alexander III made similar provisions when arranging the marriage of his son Alexander to Margaret, daughter of Guy de Dampierre, Count of Flanders, probably also in 1281. The treaty arranging the marriage, signed in December 1281, included a lengthy and complex document setting out the customs and usages which determined the succession. As well as general statement of principles, the annex includes specific examples of the rights of "A and M" and their children in particular cases. The document, while confusing in places, appears to favour primogeniture for male heirs, or their descendants, and proximity of blood for female heirs and their descendants.
The younger Alexander died on 28 January 1284, leaving only the king's granddaughter Margaret living out of his descendants. Alexander III summoned all thirteen earls of Scotland and twenty-four barons. At Scone on 5 February 1284, the signatories agreed to recognise Margaret as "domina and right heir" if neither Alexander had left a posthumous child and the king had left no children at the time of his death. However, it is unlikely that this was intended to allow Margaret to rule alone as queen regnant, but rather jointly with her future spouse, whoever he might be. While unexceptional in the circumstances, this would appear to show that Alexander III had decided on remarriage. He did remarry, to Yolande de Dreux, but died shortly afterwards as the result of an accident on 19 March 1286 without any children by her.
After King Alexander III was buried at Dunfermline Abbey on 29 March 1286, the magnates and clerics of the realm assembled at Scone in parliament to select the Guardians of Scotland who would keep the kingdom for the right heir. At this time it was thought that Queen Yolande was pregnant, so that Margaret was not yet the obvious successor. It is uncertain what happened to Yolande's child--most likely she had a miscarriage, although other accounts say that her child was still-born at Clackmannan on St. Catherine's Day (25 November 1286) with the Guardians in attendance to witness the event; just possibly she had a false pregnancy, and there was even one dubious English claim that she was faking pregnancy.
This, according to the oaths taken, made Margaret the heir at three years of age, but that same year Robert Bruce, 5th Lord of Annandale had rebelled with the aid of his son the Earl of Carrick. The Bruces captured strongholds in Galloway, and as well as bolstering their position in the south-west where their rivals the Balliols also had influence, may have been making a bid for the Crown. However, Robert Bruce seems to have overestimated his chances of successfully pressing his claim, as further support does not appear to have been forthcoming, and it is difficult to prove that even Bruce allies such as the Stewarts decided to back them, in spite of what some historians have inferred from the Turnberry Band of September 1286. The rebellion thus quickly fizzled out, though no drastic action was taken against the Bruces after they had handed back the castles they had seized. In this way, the Guardians possibly hoped to maintain the peace in Scotland between the competing claims of Robert Bruce and John Balliol, without jeopardising their ultimate loyalty to the realm, and probably to Margaret as the more generally accepted heir.
Far from the Scots displaying any desire to bring Margaret to Scotland, it was Margaret's father Eric who raised the question again. Eric sent official ambassadors to Edward I of England, then in Gascony, in May 1289, with papers referring to Margaret as "queen". Negotiations from this time forward were between Edward, who returned to England later in the year, and Eric, and excluded the Scots until Edward met with Robert Bruce and some of the Guardians at Salisbury in October 1289. The Scots were in a weak position since Eric could arrange his daughter's marriage to Edward I's son Edward or anyone else without reference to the Guardians. Accordingly, the Guardians signed the Treaty of Salisbury, which agreed that Margaret would be sent to Scotland before 1 November 1290, and that any agreement on her future marriage would be deferred until she was in Scotland.
That marriage of Edward, Prince of Wales, was in King Edward's mind is clear from the fact that a papal dispensation was received from Pope Nicholas IV ten days after the treaty was signed. Thought to show bad faith on Edward's part, the Papal Bull did not contract a marriage, only permit one should the Scots later agree to it. Edward, like Eric, was now writing of Queen Margaret, anticipating her inauguration and the subsequent marriage to his son.
Edward and the Guardians continued their negotiations, based on the collective assumption that Margaret would be queen and the young Edward king, but all these plans, including those of King Alexander, were brought to nothing as Margaret died of the effects of sea-sickness in the Orkney Islands on 26 September 1290 while sailing to Scotland. Her remains were taken to Bergen and interred beside her mother in the wall on the north side of the choir in Christ Church, Bergen.
Her death left no obvious heir to the Scottish throne and the matter of succession was resolved in the Great Cause of 1291–2.
Although derived from a text written more than a century later, it is thought by some historians that the earliest Scots verse written in Scotland dates from this time:
Quhen Alexander our kynge was dede,
That Scotland lede in lauche and le,
Away was sons of alle and brede,
Of wyne and wax, of gamyn and gle.
Our gold was changit into lede.
Christ, born in virgynyte,
Succoure Scotland, and ramede,
That stade is in perplexite.
The ballad Sir Patrick Spens has sometimes been supposed to be connected to Margaret's ill-fated voyage. Some years later a woman appeared claiming to be her, known as the False Margaret; she was executed by Haakon V, King Eric's brother and successor, in 1301.
As Margaret was never crowned or otherwise inaugurated, and never set foot on what was then Scots soil during her lifetime, there is some doubt about whether she should be regarded as a Queen of Scots. This could ultimately be a matter of interpretation. Most lists of the monarchs of Scotland do include her, but a few do not. Some contemporary documents, including the Treaty of Salisbury (see above) did describe her as "queen", but it has been argued that she should not properly be considered a monarch.
Due to lack of a clear historical precedent in Scotland's history as a fully separate country before the Union of the Crowns in 1603, there was only one occasion when a similar situation arose, i.e. on the death of the monarch the heir was outside the country and not available to be crowned more or less immediately. This was when, on the death of Robert III in 1406, his heir, who became James I, was a prisoner in England. James was eventually released and crowned in 1424. In the intervening period official documents simply referred to him as the "heir," and the Regent Albany issued coins in his own name. Nevertheless, James's reign is now usually considered to start in 1406, not 1424. If considered to have been monarch, Margaret could be considered the first queen regnant in the British isles, and at least in Scotland.