The King of Denmark is dead and has been succeeded by his brother Claudius. Claudius has also married Gertrude, the widowed Queen. Hamlet, Gertrude's son, is already distressed by his father's death and the hasty remarriage and when his father's ghost appears to tell him that he had been murdered by Claudius, Hamlet vows revenge. To cover his intentions, he feigns madness.
Polonius, the Lord Chamberlain, whose daughter Ophelia is all but betrothed to Hamlet, believes that his madness is caused by repressed love and sets a trap for them. Spied on by Polonius and Claudius, Hamlet encounters Ophelia and violently rejects her.
A Company of Players arrives and Hamlet asks them to perform a play, The Murder of Gonzago, hoping that its similarity to the murder of his own father will force Claudius to betray his guilt. Hamlet's suspicions are confirmed. He visits his mother, reviling her for her hasty marriage, and accidentally kills Polonius, hiding in the chamber. Claudius sends Hamlet to England, planning to have him murdered.
Laertes, Polonius' son returns demanding revenge for his father's death. His sister, Ophelia, maddened by grief, has drowned herself. Hamlet returns and confronts Laertes and Claudius at her funeral. Claudius plots with Laertes to kill Hamlet in a fencing match in which Laertes will have a poisoned sword. The plot miscarries and Laertes dies. Gertrude drinks from a poisoned cup intended for Hamlet and also dies. Hamlet, wounded by the poisoned sword, kills Claudius before he, too, dies.
Fortinbras of Norway lays claim to the throne of Denmark.