Shakespeare's tragedy, Macbeth, is based on the account of Macbeth's life and reign in Raphael Holinshed's Chronicles of England, Scotland, and Ireland, published in 1577. By the time this came to be written, Macbeth himself had been dead for over 500 years and the story of his life had long since passed into legend. Although Holinshed is closer to the facts than Shakespeare, neither is particularly accurate. Holinshed, like Shakespeare, includes supernatural elements, though he has nymphs or fairies rather than witches.
Not much is known about the real Macbeth. He was born around 1005, the son of Findleach, King of Moray. He may also have been the grandson of King Malcolm II of Alba. The Anglo-Saxon Chronicle records that when King Canute of Denmark, England and Norway came to Scotland in 1031 to accept Malcolm's submission, Macbeth also submitted to him. Duncan I, King of Alba, invaded Moray in 1040 and was killed in battle against Macbeth at Bothnagowan.
Upon Duncan's death in 1040, Macbeth became King of Alba as well as Moray, effectively King of Scotland, though the area he ruled was still smaller than Scotland is today. There is no evidence that his reign was particularly bloody or tumultuous. In fact, Scotland was stable enough for Macbeth to make a pilgrimage to Rome which lasted several months in 1050. There was no serious challenge to his rule or insurrection during his absence, though he did have to repel an English invasion in 1054. He died in 1057, in battle against the future King Malcolm III, and was buried on the holy island of Iona, traditional resting place of the Scottish kings.