The title 'Thane of Cawdor' is a title in the Peerage of Scotland. In William Shakespeare's dramatic play "Macbeth", this title 'Thane of Cawdor' is given to Macbeth after the previous Thane of Cawdor is captured and executed for treason.

Shakespeare uses this fact to set the play in motion where Macbeth thinks of becoming king. It jump starts his ambition to set his sights on the throne of Scotland. It was pointed out that Macbeth seemingly had no ambitions toward the throne. This changed when he heard it prophesied by three witches that he would eventually become Thane of Cawdor and after that King of Scotland.

The historical King Macbeth fought a Thane of Cawdor who died in battle. At that actual point in time concerning the real history of Scotland, King Macbeth did not acquire this title. In 1742, the 2nd Earl of Cawdor wrote a history of the Thanes of Cawdor. This written history was published in 1859. According to the 2nd Earl, the first thane was originally a Celtic chieftain who allied himself with the Anglo-Saxon King of Scotland at a time. This fact had been lost in most historical records that were available to the general public.

More Info: study.com