The protagonist of Hamlet is Prince Hamlet of Denmark, son of the recently deceased King Hamlet and the nephew of King Claudius, his father's brother and successor. After the death of King Hamlet, Claudius hastily marries King Hamlet's widow, Gertrude, Hamlet's mother. In the background is Denmark's long-standing feud with neighbouring Norway, and an invasion led by the Norwegianprince, Fortinbras, is expected.
The play opens on a cold night at Elsinore, the Danish royal castle. The sentinels try to persuade Hamlet's friend Horatio that they have seen King Hamlet's ghost, when it appears again. After hearing from Horatio of the Ghost's appearance, Hamlet resolves to see the Ghost himself. That night, the Ghost appears to Hamlet. He tells Hamlet that he is the spirit of hisfather, and discloses that Claudius murdered King Hamlet by pouring poison in his ears. The Ghost demands that Hamlet avenge him; Hamlet agrees and decides to fake madness to avert suspicion. He is, however, uncertain of the Ghost's reliability.
Busy with affairs of state, Claudius and Gertrude try to avert an invasion by Prince Fortinbras of Norway. Perturbed by Hamlet's continuing deep mourningfor his father and his increasingly erratic behaviour, they send two student friends of his—Rosencrantz and Guildenstern—to discover the cause of Hamlet's changed behaviour. Hamlet greets his friends warmly, but quickly discerns that they have turned against him.
Polonius is Claudius' trusted chief counsellor; his son, Laertes, is returning to France, and his daughter, Ophelia, is courted byHamlet. Neither Polonius nor Laertes thinks Hamlet is serious about Ophelia, and they both warn her off. Shortly afterwards, Ophelia is alarmed by Hamlet's strange behaviour and reports to her father that Hamlet rushed into her room but stared at her and said nothing. Polonius assumes that the "ecstasy of love" is responsible for Hamlet's madness, and he informs Claudius and Gertrude. Later, in theso-called Nunnery Scene, Hamlet rants at Ophelia, and insists she go "to a nunnery."
Hamlet remains unconvinced that the Ghost has told him the truth, but the arrival of a troupe of actors at Elsinore presents him with a solution. He will stage a play, re-enacting his father's murder, and determine Claudius' guilt or innocence by studying his reaction. The court assembles to watch the play; Hamletprovides a running commentary throughout. During the play, Claudius abruptly rises and leaves the room, which Hamlet sees as proof of his uncle's guilt. Claudius, fearing for his life, banishes Hamlet to England on a pretext, closely watched by Rosencrantz and Guildenstern, with a letter instructing that the bearer be killed.
Gertrude summons Hamlet to her closet to demand an explanation. On hisway, Hamlet passes Claudius in prayer but hesitates to kill him, reasoning that death in prayer would send him to heaven. In the bedchamber, a row erupts between Hamlet and Gertrude. Polonius, spying hidden behind an arras, makes a noise; and Hamlet, believing it is Claudius, stabs wildly, killing Polonius. The Ghost appears, urging Hamlet to treat Gertrude gently but reminding him to kill Claudius.Unable to see or hear the Ghost herself, Gertrude takes Hamlet's conversation with it as further evidence of madness. Hamlet hides Polonius' corpse.
Demented by grief at Polonius' death, Ophelia wanders Elsinore singing bawdy songs. Her brother, Laertes, arrives back from France, enraged by his father's death and his sister's madness. Claudius convinces Laertes that Hamlet is solely responsible;then news arrives that Hamlet is still at large. Claudius swiftly concocts a plot. He proposes a fencing match between Laertes and Hamlet in which Laertes will fight with a poison-tipped sword, but tacitly plans to offer Hamlet poisoned wine if that fails. Gertrude interrupts to report that Ophelia has drowned.
Two gravediggers discuss Ophelia's apparent suicide, while digging her grave....