A few weeks later, Polonius is arranging to spy on his son when his daughter tells him that Hamlet has come into her chamber, apparently in a state of madness. The King arranges to have Hamlet's fellow students, Rosencrantz and Guildenstern, spy upon him. Polonius is keen to prove that Hamlet has become mad as a result of unrequited love and tries to engage the Prince in conversation. Hamlet manages to avoid telling the truth to either party. He persuades an actor to recite a sad speech and then bemoans his own lack of passion.
Polonius arranges for his daughter, Ophelia, to encounter Hamlet while the King and himself are watching. The prince enters, lamenting the pains of life and the afterlife, and then launches a savage attack upon his erstwhile lover. Then Hamlet arranges for the players to present a play which depicts the events of his father's death in order to prick the King's conscience and so provide proof of his guilt. The plan works and Hamlet vows bloody murder.
The play has reminded Claudius of the depth of his sinfulness and he attempts to pray for the strength to seek forgiveness. Hamlet enters but decides he can't kill the King while he is praying because that would save his soul. He goes to his mother instead and berates her infidelity to her late husband. Hearing a noise, Hamlet kills Polonius who was hiding behind a wall hanging. He continues with his criticism of his mother until he is interrupted by the apparition of his father who tells the Prince that he is wasting his anger on the wrong person.
When the King learns of Polonius' murder, he orders Hamlet's arrest and arranges to have him sent to England with letters ordering the King of England to behead Hamlet upon arrival. Hamlet leaves the country, bumping into the army of the soldierly Prince Fortinbras on the way. Ophelia becomes insane and Laertes returns demanding retribution for his father's death. When Claudius learns that Hamlet has been intercepted by pirates and returned to Denmark, he hatches a plot to have the prince killed with a poisoned sword during a fencing match with Laertes. Ophelia drowns herself, apparently too insane to notice the water.
Hamlet meets with Horatio in a graveyard and bemoans the shortness of life and the waste that is death. A funeral procession approaches that turns out to be Ophelia's. Laertes protests his everlasting grief and throws himself into the grave. Hamlet emerges from hiding and gives a speech mocking and outdoing Laertes' passion. Laertes attempts to strangle Hamlet.
Upon being told about the fencing match, Hamlet reveals a deep unease and premonition that he will die. Nonetheless, he is determined to go through with the match. Laertes has a poisoned sword and the King has prepared a poisoned cup of wine as a backup. Laertes stabs Hamlet. The swords get mixed up and Hamlet stabs Laertes. The Queen drinks from the poisoned cup. She dies quickly and Laertes, in his dying words, reveals that the King is the source of treachery. Hamlet stabs the King and makes him drink the last of the wine, finally fulfilling his mission of revenge. Hamlet stops Horatio from killing himself and obtains his promise to tell Hamlet's story. Hamlet dies. Prince Fortinbras enters with his army, quickly assesses the situation and decides to take over as King. As Hamlet's body is taken to a soldier's funeral, Horatio promises to tell the full story of what has happened.