Shakespeare was an expert in his craft and was keenly aware what his audiences expected of him and how to ensure his own popularity. Macbeth was written in consideration of James I for whom Shakespeare staged his version of Macbeth and taking much of his information from the Holingshed Chronicles of England. James I was believed to be related to Banquo and in Shakespeare's Macbeth, Banquo is honorable and loyal to his king.
Mac Bethad mac Findláich, translated into English as Macbeth, was born in about 1005. His father was an earl of Moray.
Macbeth did indeed succeed Duncan to the throne in Scotland , in the eleventh century. Duncan was the grandson of Malcolm II to whom Macbeth was related on his mother's side. Furthermore, Duncan was killed by Macbeth during a raid on Moray. Macbeth became King of Scotland and Duncan's wife fled with her sons Malcolm III and Donald. There is controversy over the actual recording of historical events and, as expected, different versions.
Macbeth is believed to have successfully reigned for some years. Some claim that Macbeth was a tyrant and there is confusion over names that were attributed to him - or whether these names actually belonged to other people with whom he was associated. He was defeated during a successful attempt to return Duncan's son Malcolm III to the throne.