William Shakespeare’s Hamlet is not a true story, as it does not accurately reflect the historical record. Research has revealed, however, that Shakespeare likely took inspiration for his story from accounts of Danish history.
Toward the end of the twelfth century, the Gesta Danorum, a sixteen-volume work by historian Saxo Grammaticus, purported to be a record of the history of the Danish tribes. Contained therein is the story of Amleth, Prince of Denmark, which recounts the actions of rulers of Denmark and the personalities surrounding them. Parts of the story were mirrored by Shakespeare in his play Hamlet. Unfortunately, Grammaticus’s work is based on Norse oral folk tales and legends passed down through generations, leaving the historical accuracy of this account open to debate.
Whereas Amleth, Prince of Denmark is more of a romantic tale, Hamlet is clearly a tragedy. Nevertheless, despite the different genres, details of the stories lend credibility to the connection between Shakespeare’s Hamlet and Amleth. For example, Amleth, like Hamlet, feigns madness, and both characters have a thirst for revenge. Also, characters portrayed in Hamlet have their counterparts similarly portrayed in Amleth. Claudius, Gertrude, Ophelia, and Polonius are representative examples.
Though it is widely accepted among experts that parts of Hamlet are based on or inspired by actual historical events, the emotions, motivations, and actions of the characters of the play are Shakespeare's own invention. This is not the only one of Shakespeare's plays to be inspired by real events or people, but it's important to remember that Shakespeare's purpose in writing was to create an entertaining and emotionally affecting drama—not to portray historical events realistically. Thus, it would be incorrect to characterize Hamlet as “a true story.”