Sources for Hamlet
At the end of the twelfth century, the Historiae Danicae or Danish History of Saxo Grammaticus told the story of ‘Amleth’, son of a governor of Jutland named Horwendil.  In the story, Horwendil is murdered by his brother Feng, who then marries Horwendil’s widow Gerutha. Amleth, afraid of Feng, pretends to be half-witted. When Feng’s cronies try to tempt Amleth into sexual relations with a woman, and when Amleth kills a spy who is attempting to overhear his conversation, Amleth’s confessions are dismissed as raving. Feng, however, suspects that Amleth is plotting revenge, and sends him to Britain, accompanied by two men bearing a letter to the king, asking him to put Amleth to death. Amleth finds the letter and changes it so that the two men are the ones to die, while he marries the king’s daughter. Upon returning home, Amleth burns the palace, announces his vengeance, kills Horwendil, and becomes king. After further adventures in Britain, Amleth returns to Denmark, only to be slain in battle, whereupon his second wife transfers her affections to his killer.
Here we see the outline of the plot, and many of the characters and incidents, of Shakespeare’s Hamlet. François de Belleforest included a version of the Amleth story in his Histoires Tragiques (1564-82). An English version, The Hystorie of Hamblet, was published, but not until 1608.  However, there is thought to have been a play about Hamlet (known as the Ur-Hamlet) before Shakespeare’s version was written. Thomas Nashe punningly referred in 1589 to ‘whole Hamlets, I should say handfuls, of Tragicall speeches’,  and in 1596 Thomas Lodge wrote of ‘the Visard of the ghost which cried so miserably at the theatre, like an oister-wife, Hamlet, revenge’. The First Quarto of Shakespeare’s Hamlet may have been based in part on performances of the Ur-Hamlet.  It has been called the ‘bad quarto’, and has significant variations in plot and language from other versions: for example, Polonius is called ‘Corambis’ and his servant ‘Montano’. Scholars have suggested that Thomas Kyd (whom Nashe may have satirised in 1589) wrote the Ur-Hamlet, or was influenced by it. Certainly, Kyd’s The Spanish Tragedy (written in the 1580s) has some plot elements in common with Shakespeare’s Hamlet that do not derive from Saxo, such as a vengeful ghost, a play-within-a-play, and a woman’s grief-stricken madness and suicide. Thus, Shakespeare may have used the Ur-Hamlet and/or The Spanish Tragedy as sources. 
As well as earlier versions of the Hamlet story, Shakespeare drew on classical sources. Claudius was the name of Nero’s stepfather and great-uncle. Nero was suspected of abetting the death of Claudius, and allegedly killed his own mother.  Hamlet refers to this when he counsels himself against attacking his mother, saying ‘Let not ever/ the soul of Nero enter this firm bosom [...] I will speak daggers to her, but use none’.  Lucius Junius Brutus is supposed to have pretended to be an idiot in order to take revenge on the king Tarquin for the death of his brother, eventually, after the rape of Lucretia  by Tarquin’s son, leading the revolt that overthrew the Tarquins, and founding the Roman republic. 
Yet many of the details of Hamlet reflect its Renaissance setting. Its murders, for example, involve fencing (according to the latest style), and poison poured into the ear (the Duke of Urbino was rumoured to have been killed this way in 1538.  Scholars have seen topical references in the play, reading Gertrude as a reference to Elizabeth I, or Fortinbras to James VI and I.  Kingship gained by murderous means and the possibility of revenge were issues of the moment. Geoffrey Bullough mentions that ‘in 1587 James VI was called on by many Scottish nobles to avenge his mother’s murder by Queen Elizabeth’.  A Latin poem represented Darnley as a ghost reminding James of his mother’s infidelity and implication in Darnley’s murder.  Contemporary pamphlets may have left their mark on Hamlet: the name ‘Polonius’ may have been suggested by the treatise ‘The Counsellor’ (Bradocke, 1598) by a Polish statesman, Goslicius. Hamlet speaks of Polonius as ‘this councillor who was in life a most foolish prating knave’.  Queen Elizabeth had spoken slightingly of Poland in 1597 after a diplomatic clash.  Another theory links Polonius with Lord Burghley, (1520-98) who wrote Certain Preceptes, or Directions for the well ordering and carriage of a mans life [...] left by William, Lord Burghly, to his sonne [...], thought to be reflected in Polonius’ advice to Laertes.  In a possible biographical reference, Shakespeare’s own son, who had died at the age of eleven, was named Hamnet, of which Hamlet was a variation.
While Shakespeare’s use of earlier material in Hamlet may contribute to the problems of its interpretation,  the mixture of pagan, classical and Renaissance motifs combine to create a complex and richly detailed play.
1. Reproduced in English in Geoffrey Bullough, Narrative and Dramatic Sources of Shakespeare, 8 vols (London: Routledge, 1957-75), VII, Major Tragedies: Hamlet, Othello, King Lear, Macbeth (1973, 1978), pp. 60-79. Return to text
3.Thomas Nashe, The Works of Thomas Nashe, ed. by R. B. McKerrow, (Oxford: Blackwell, 1958), III, p. 315, cited in Bullough, p. 15; and cf. William Shakespeare, Hamlet, ed. by Ann Thompson and Neil Taylor, The Arden Shakespeare, 3rd Series (London: Thomson Learning, 2006), pp. 44-5. Return to text
4. Kenneth Muir, The Sources of Shakespeare’s Plays
(London: Methuen, 1977), p. 160. Return to text
6. Suetonius claimed that Nero may have been involved in poisoning Claudius; cf. ‘De Vita Caesarum’, in J. C. Rolfe, ed., Suetonius, 2 Vols, The Loeb Classical Library (London: Heinemann, and New York: MacMillan, 1914), II.87-187. Tacitus, however, accused Agrippina of poisoning Claudius; cf. ‘Annals’, The Complete Works of Tacitus, trans. by Alfred Church and William Brodribb (New York: Random House, 1942), 12.66-7, pp. 282-3. On Nero’s killing of Agrippina, cf. Tacitus, 14.1-6. Return to text
8. Shakespeare’s poem The Rape of Lucrece deals with this subject. Return to text
9. Cf. Hamlet
, p. 64. The source of this tradition is Livy, History of Rome
, trans. by the Rev. Canon Roberts (London: Dent, 1905), I.56-60. Return to text
13. Bullough, p. 19, citing the Latin poem in G. Lambin, ‘Une première ébauche d’Hamlet’, Les Langues Modernes
, XLIX (Paris, 1955), pp. 37-45. Return to text
16. This theory is mentioned in E. K. Chambers, William Shakespeare: A Study of Facts and Problems
, 2 vols (Oxford: Clarendon, 1930), I, p. 418, although Chambers himself feels the evidence is insufficient. Return to text
17. Some critics have felt that Shakespeare did not effectively integrate earlier versions of the Hamlet story into his own play. Cf. Muir, pp. 162-3. Return to text