Did James VI of Scotland write Ur-Hamlet?

On the second of March in the year 1316, the very pregnant 19-year-old Lady Marjorie fell off her horse and broke her neck. The baby that was ripped from her dead womb was the son of Walter Stewart, the 6th High Steward of Scotland. Lady Marjorie was the daughter of King Robert I of Scotland. That baby would grow up to be King Robert II of Scotland. Thus began the line of Scottish Stewart kings. And thus began the deadly curse on the Stewart line, a curse that would not end until King James VI of Scotland became King James I of England.
 "It is the false steward, that stole his master's daughter." 
Who would dare risk offending the soon-to-be Stewart King of England with such a line? Who else but the Stewart King himself? The motif of a cursed birth from a daughter's dead womb is strongly reflected in Hamlet.
 Hamlet
 For if the sun breed maggots in a dead dog, being a god kissing carrion - Have you a daughter?
 Lord Polonius
 I have, my lord.
 Hamlet
 Let her not walk i' the sun: conception is a blessing,
 but not as your daughter may conceive.
When Lady Marjorie was 11 years old she had been captured by the English. Edward II of England had her confined to a nunnery for about 7 years. When she was 17, Scotland won the Battle of Bannockburn and she was returned to Scotland where she was given in marriage to Walter Stewart as a reward for his valor in the battle. Two years later she died, then gave birth, posthumously, to the first of the Stewart line of Scottish kings. (This is paralleled by Hamlet being born the same day that Hamlet Sr. defeated Fortinbras Sr.)
 Get thee to a nunnery. Why wouldst thou be a breeder of sinners?
Lord Polonius
 Will you walk out of the air, my lord?
 Hamlet
 Into my grave.
Lord Polonius
 Indeed, that is out o' the air.
 Aside: How pregnant sometimes his replies are!
Horatio (to the ghost)
 Or if thou hast uphoarded in thy life
 Extorted treasure in the womb of earth,
 For which, they say, you spirits oft walk in death,
For more on the birth-death motif, see “The Womb of Earth” in “Motifs in Hamlet”.
A dead horsewoman bequeathed the Scottish throne to the Stewart line. That inheritance doomed them to a series of violent deaths, mostly in battle with English kings. Similarly in the play, a horseman named Death ("LeMord") praised Laertes' skill as a swordsman, which led to his mutually fatal duel with Hamlet.
The first Stewart King, Robert II, died of old age.
The second Stewart King, Robert III, died of a “broken heart” after his son (the future James I) was kidnapped by pirates who turned him over to Henry IV of England. The English kept James for 18 years, but they treated him well, educating him and finally sending him home with an English bride.
Hamlet, speaking of the pirates who had captured him:
They have dealt with 
me like thieves of mercy: 
 But the next four, James I through IV, all died violently.	Claudius, as he prepared to poison Hamlet’s drink:		 The king shall drink to Hamlet's better breath; 		And in the cup an union shall he throw, 				Richer than that which four successive kings 			In Denmark's crown have worn. But James VI did not want to join his four forefathers’ (and namesakes’) fatal union.
James I was assassinated by rebellious Scottish cousins.
James II was killed by his own cannon.
After Claudius (cloud-ius) ordered a cannon salute (“the great cannon to the clouds shall tell”), Hamlet wished that Claudius would literally, as well as figuratively aim his cannon at himself (cloud-ius): “O, that...the Everlasting had not fix'd His canon [his cannon] 'gainst self-slaughter!” In the end, Claudius slaughtered himself with poison “temper’d by himself” to the accompaniment of cannon fire (“Let all the battlements their ordnance fire: The king shall drink”). 
James III was killed in battle against his rebellious son.
James IV was killed in battle against England.
James V died of natural causes (or of a “broken heart’).
Mary Queen of Scots was beheaded by order of her cousin Elizabeth I.
On his deathbed, James V said of his sole heir, his infant daughter Mary, “It came wi’ a lass and it shall go wi’ a lass.” He was referring to the Stewart line of kings which had begun with Margaret’s posthumous delivery of Robert II and which James V believed would end with his daughter Mary. But he was wrong. Mary Queen of Scots married a Stewart cousin and gave birth to James Stewart who would become James VI of Scotland and I of England. All subsequent monarchs of England have been descendants of James VI and I, but none of them (except Charles I) died violently. So the dynasty didn’t end with Mary, but the Scottish curse did. 
Mary’s first husband was Francis II, King of France. He died from an infected ear.
This was reflected both in Hamlet and in The Mousetrap.
The ghost of Hamlet’s father described how he was murdered with poison poured into his ear:
Sleeping within my orchard, 
My custom always of the afternoon, 
With juice of cursed hebenon in a vial, 
And in the porches of my ears did pour 
The leperous distilment
Hamlet, describing “The Mousetrap”:
..comes in a fellow... and pours poison in the King's ears
Hamlet described his Uncle Claudius to his mother:
Here is your husband; like a mildew'd ear, 
Blasting his wholesome brother.
History of the Affairs of Church and State in Scotland:
[referring to the death of Francis II]
“He died of an abscess in the ear, and not by poison, the rumours of which have been proved by De Thou and other historians to be without foundation.”	
" He was suddenly striken with an aposthume in that deaf car that never would hear the truth. 
of God." - John Knox
Hamlet 
Two thousand souls and twenty thousand ducats 
Will not debate the question of this straw: 
This is the imposthume of much wealth and peace, 
That inward breaks, and shows no cause without 
Why the man dies. I humbly thank you, sir. 
History of the Affairs of Church and State in Scotland:
[quoting a limerick allegedly popular in France right after Francis II died]
 “Leist Francis, that unhappy child,
His father’s footsteps following plane,
To Christ crying, deaf ears did yield,
Ane rotten ear then was his bane”
Hamlet, speaking of his father’s ghost:
It waves me forth again: I'll follow it. 
Hamlet’s father’s ghost to Hamlet:
But this eternal blazon must not be 
To ears of flesh and blood. List, list, O, list! 
If thou didst ever thy dear father love-- 
.........................
Now, Hamlet, hear: 
'Tis given out that, sleeping in my orchard, 
A serpent stung me; so the whole ear of Denmark 
Is by a forged process of my death 
Rankly abused:
Mary’s 2nd husband, James’ father, was found dead in the orchard after an explosion destroyed his house.
After his father was murdered and his mother exiled, James was adopted by his father’s parents. In their house was a large painting showing Darnley’s murder, with the inscription to “shut not out of his memory the recent atrocious murder of the King his father, until God should avenge it through him.”
Ghost 
Revenge his foul and most unnatural murder. 
	................................
	Hamlet, remember me.
James VI grew up to love literature, wordplay, and the theater. He had a predilection for comparing himself to literary figures. When he crossed the North Sea to meet his Danish bride, James compared himself to Leander swimming the Hellespont to be with Hero (which might have been Marlowe’s inspiration for beginning his translation of Hero and Leander.) He could not have failed to be impressed by the similarities between himself and Hamlet.
Hamlet’s stepfather, King Claudius of Denmark, who drained his draughts of Rhenish down as ordnance was shot off, in the end died from (poisoned) drink. James’ father-in-law, King Frederick II of Denmark, was said to have died from excessive drinking. (Danish nobles Rosencrantz and Guildenstern marched at the head of Frederick’s funeral procession.) During his honeymoon at Elsinore, James had been much impressed with the custom of firing ordnance at every occasion. 
Hamlet: “Two thousand souls and twenty thousand ducats will not debate the question of this straw...”
Martin Luther: “St. James Epistle is really an epistle of straw.”
As Protestants and Catholics vied for his allegiance, James may have felt like a straw in the wind. 
James’ mother, Mary Queen of Scots, was beheaded after she had been caught communicating with conspirators with notes hidden in the bungholes of barrels which were routinely carried in and out of the castle where she was imprisoned.
Hamlet 
To what base uses we may return, Horatio! Why may 
not imagination trace the noble dust of Alexander, 
till he find it stopping a bung-hole? 
...............
Imperious Caesar, dead and turn'd to clay, 
Might stop a hole to keep the wind away: 
O, that that earth, which kept the world in awe, 
Should patch a wall to expel the winter flaw! 
The north wind was a motif in Hamlet symbolizing Hamlet’s madness brought on by the influence of his vengeful father (who was associated with “yond same star that's westward from the pole”). “I am but mad north-north-west.” For James, any attempt to revenge his mother’s death would be suicidal madness. 
In his secret correspondence with Sir Robert Cecil in 1601, preparing for his succession after Elizabeth’s eventual death, the codeword for James was “30”.
Player King 
Full thirty times hath Phoebus' cart gone round 
Neptune's salt wash and Tellus' orbed ground, 
And thirty dozen moons with borrow'd sheen 
About the world have times twelve thirties been, 
Since love our hearts and Hymen did our hands 
Unite commutual in most sacred bands. 
--Ray Eston Smith Jr 00:56, 27 June 2008 (UTC)