A principal source comes from the Daemonologie of King James published in 1597 which included a news pamphlet titled Newes from Scotland that detailed the famous North Berwick Witch Trials of 1590. The publication of Daemonologie came just a few years before the tragedy of Macbeth with the themes and setting in a direct and comparative contrast with King James' personal experiences with witchcraft. Not only had this trial taken place in Scotland, the witches involved were recorded to have also conducted rituals with the same mannerisms as the three witches. One of the evidenced passages is referenced when the witches involved in the trial confessed to attempt the use of witchcraft to raise a tempest and sabotage the very boat King James and his queen were on board during their return trip from Denmark. This was significant as one ship sailing with King James' fleet actually sank in the storm. The following quote from Macbeth is one such reference:
"purposely to be cassin into the sea to raise winds for destruction of ships."
Macbeth has been compared to Shakespeare's Antony and Cleopatra. As characters, both Antony and Macbeth seek a new world, even at the cost of the old one. Both fight for a throne and have a 'nemesis' to face to achieve that throne. For Antony, the nemesis is Octavius; for Macbeth, it is Banquo. At one point Macbeth even compares himself to Antony, saying "under Banquo / My Genius is rebuk'd, as it is said / Mark Antony's was by Caesar." Lastly, both plays contain powerful and manipulative female figures: Cleopatra and Lady Macbeth.
Shakespeare borrowed the story from several tales in Holinshed's Chronicles, a popular history of the British Isles well known to Shakespeare and his contemporaries. In Chronicles, a man named Donwald finds several of his family put to death by his king, King Duff, for dealing with witches. After being pressured by his wife, he and four of his servants kill the King in his own house. In Chronicles, Macbeth is portrayed as struggling to support the kingdom in the face of King Duncan's ineptitude. He and Banquo meet the three witches, who make exactly the same prophecies as in Shakespeare's version. Macbeth and Banquo then together plot the murder of Duncan, at Lady Macbeth's urging. Macbeth has a long, ten-year reign before eventually being overthrown by Macduff and Malcolm. The parallels between the two versions are clear. However, some scholars think that George Buchanan's Rerum Scoticarum Historia matches Shakespeare's version more closely. Buchanan's work was available in Latin in Shakespeare's day.
No medieval account of the reign of Macbeth mentions the Weird Sisters, Banquo, or Lady Macbeth, and with the exception of the latter none actually existed. The characters of Banquo, the Weird Sisters, and Lady Macbeth were first mentioned in 1527 by a Scottish historian Hector Boece in his book Historia Gentis Scotorum (History of the Scottish People) who wanted to denigrate Macbeth in order to strengthen the claim of the House of Stewart to the Scottish throne. Boece portrayed Banquo as an ancestor of the Stewart kings of Scotland, adding in a "prophecy" that the descendants of Banquo would be the rightful kings of Scotland while the Weird Sisters served to give a picture of King Macbeth as gaining the throne via dark supernatural forces. Macbeth did have a wife, but it is not clear if she was as power-hungry and ambitious as Boece portrayed her, which served his purpose of having even Macbeth realise he lacked a proper claim to the throne, and only took it at the urging of his wife. Holinshed accepted Boece's version of Macbeth's reign at face value and included it in his Chronicles. Shakespeare saw the dramatic possibilities in the story as related by Holinshed, and used it as the basis for the play.
No other version of the story has Macbeth kill the king in Macbeth's own castle. Scholars have seen this change of Shakespeare's as adding to the darkness of Macbeth's crime as the worst violation of hospitality. Versions of the story that were common at the time had Duncan being killed in an ambush at Inverness, not in a castle. Shakespeare conflated the story of Donwald and King Duff in what was a significant change to the story.
Shakespeare made another important change. In Chronicles, Banquo is an accomplice in Macbeth's murder of King Duncan, and plays an important part in ensuring that Macbeth, not Malcolm, takes the throne in the coup that follows. In Shakespeare's day, Banquo was thought to be an ancestor of the Stuart King James I. (In the 19th century it was established that Banquo is an unhistorical character, the Stuarts are actually descended from a Breton family which migrated to Scotland slightly later than Macbeth's time.) The Banquo portrayed in earlier sources is significantly different from the Banquo created by Shakespeare. Critics have proposed several reasons for this change. First, to portray the king's ancestor as a murderer would have been risky. Other authors of the time who wrote about Banquo, such as Jean de Schelandre in his Stuartide, also changed history by portraying Banquo as a noble man, not a murderer, probably for the same reasons. Second, Shakespeare may have altered Banquo's character simply because there was no dramatic need for another accomplice to the murder; there was, however, a need to give a dramatic contrast to Macbeth—a role which many scholars argue is filled by Banquo.
Other scholars maintain that a strong argument can be made for associating the tragedy with the Gunpowder Plot of 1605. As presented by Harold Bloom in 2008: "[S]cholars cite the existence of several topical references in Macbeth to the events of that year, namely the execution of the Father Henry Garnett for his alleged complicity in the Gunpowder Plot of 1605, as referenced in the porter's scene." Those arrested for their role in the Gunpowder Plot refused to give direct answers to the questions posed to them by their interrogators, which reflected the influence of the Jesuit practice of equivocation. Shakespeare by having Macbeth say that demons "palter...in a double sense" and "keep the promise to our ear/And break it to our hope" confirmed James's belief that equivocation was a "wicked" practice, which reflected in turn the "wickedness" of the Catholic Church. Garnett had in his possession A Treatise on Equivocation, and in the play the Weird Sisters often engage in equivocation, for instance telling Macbeth that he could never be overthrown until "Great Birnan wood to high Dunsinane hill/Shall Come". Macbeth interprets the prophecy as meaning never, but in fact, the Three Sisters refer only to branches of the trees of Great Birnan coming to Dunsinane hill.