This record exists to keep the fiction and the tradition apart. The Macbeth connection comes from a play, which took its material from Holinshed's chronicle. The real Macbeth's links to Glamis are not supported by any source Wikipedia cites.
The Malcolm II tradition is older, though accounts disagree on how he died and whether he was murdered at Glamis or died of wounds after a nearby battle. Ghost guides sometimes hang Malcolm's death on the castle's haunted reputation, which is an unsupported step.
Comments