Prince Hamlet of Denmark is the son of King Hamlet, who has recently passed away. He has been succeeded to the throne by his brother, Claudius, who has also succeeded the late King by marrying his widow, Gertrude. It is quite a tense time in Demnark's history, because an invasion by Norway is feared.
Meanwhile, closer to home at Castle Elsinore, sentries Bernardo and Marcellus have been seeing a ghost. They talk of how much the ghost looks like King Hamlet, and when they see him again they drag Horatio, Prince Hamlet's close friend, outside so that he can witness it too. Horatio agrees that the ghost looks just like the late King and vows to tell the prince about it.
Hamlet is miserable at the castle. He misses his father and loathes Claudius. He also feels that his mother has been disloyal to his father's memory by marrying so quickly again after his death. He watches as Claudius grants permission for his adviser Polonius to send his son, Laertes, away to school in France again. Paradoxically, he forbids Hamlet to return to his studies in Wittenberg out of spite, telling him that he should not still be mourning his father. Horatio tells him about the ghost in a desperate attempt to cheer him up. After the court exits, he goes with Horatio to see if he can see the ghost for himself.
As Polonius is preparing his son for his trip back to France, his daughter, Ophelia, confesses that she has feelings for Hamlet. Laertes disapproves of this and Polonius instructs her to reject any advances that Hamlet makes. Ophelia is saddened by this as she is starting to fall in love with the prince.
Hamlet waits on the ramparts of the castle and when the ghost appears to him, it is to tell him that he was murdered by Claudius and that it is Hamlet's responsibility to avenge his death. Hamlet promises to do so, and the ghost disappears again. He comes up with a plan to act as though he is going mad, and shares his intentions with Horatio and the two sentries, swearing them to secrecy.
Ophelia tells her father that the previous night, Hamlet arrived at her door shoeless, his hair in disarray, acting strangely. Polonius assumes that he has been driven mad by unrequited love for Ophelia, and goes to tell Gertrude and Claudius of Hamlet's mental malady. He finds the King and Queen welcoming Rosencrantz and Guildenstern to the castle' they are acquaintances of Hamlet and as soon as Claudius hears of Hamlet's apparent descent into madness, he orders the young guests to find out what has precipitated this behavior. Whilst Polonius is visiting with them a messenger arrives from Norway to tell him that the King has rebuked Prince Fortinbras for attempting to re-fight the battles that his father lost. Fortinbras had conscripted forces to march on Denmark but on his father's orders, these troops will now march through Denmark's territory en route to Poland.
It does not take long for Hamlet to realize that his one-time friends are now spying on him. He still continues to act as though he trusts them; when they tell him that they brought a troop of actors with them, Hamlet asks them to deliver a soliloquy about the death of King Priam and Queen Hecuba at the end of the Trojan War. Hamlet is impressed by the way in which they deliver the speech and arranges for them to stage The Murder of Gonzaga at court. Its plot is similar to the events surrounding his father's death and he wants to watch Claudius' reaction to it in order to see if the ghost has been telling him the truth.
Fearing that it is love for his daughter that has driven Hamlet mad, Polonius forces Ophelia to return the love notes and trinkets that Hamlet has given her. He wants to watch Hamlet's reaction to this perceived rejection. Hamlet appears distressed, although it is impossible to know if this is genuine or part of his act. The court reassembles to watch the play and Claudius leaves suddenly after the Player King is murdered by his rival, who pours poison into his ear. Hamlet interprets this as a sign of his guilt.
Gertrude is furious with Hamlet and summons him to her room. They fight angrily with each other and Gertrude calls out for help because she believes that Hamlet is angry enough to kill her. Polonius joins in her cries for help, as he has been hiding behind a tapestry in the chamber, watching the altercation. He comes up behind Hamlet to try to subdue him but Hamlet believes that it is Claudius sneaking up on him and stabs wildly into the air, killing Polonius. The ghost of his father appears to him, chastising him for not acting quickly enough, and because Gertrude cannot see the ghost of her husband, she assumes that Hamlet is having a conversation with himself, another sign of his madness. Hamlet begs his mother to stop sleeping with Claudius, and drags Polonius' body from her room.
Hamlet torments Claudius and makes him try to guess where he has hidden Polonius' body. Claudius begins to fear for his own life and sends Hamlet to England. Rosencrantz and Guildenstern are dispatched with him, taking a sealed letter to the King of England that asks for Hamlet's immediate execution.
Ophelia has descended into madness herself, grief-stricken at the loss of her father. Laertes is enraged about the death of his father and the effect that it has had on his sister. Claudius convinces him that the blame for everything lies solely with Hamlet, but when a letter arrives that suggests Hamlet is back in Denmark, he realizes that his plan did not work, and so abruptly calls for a duel between Laertes and Hamlet. Laertes will be given a foil with a poisoned tip and as a back-up plan, in case he loses the fencing match, Claudius will offer poisoned wine to Hamlet to celebrate his victory.
Horatio receives word from Hamlet telling him that he negotiated with the pirates that attacked the ship he was sailing on to England. Hamlet meets up with Horatio by the side of the grave that two gravediggers are digging for Ophelia, who has drowned. Hamlet contemplates his own mortality as he mourns Ophelia. Her funeral procession arrives and Laertes, seeing Hamlet, starts to brawl with him but their altercation is quickly broken up.
At Elsinore, Hamlet receives his invitation to fence against Laertes and accepts the challenge in the face of Horatio's warnings against doing so. Hamlet is an expert fencer and he does well, leading by two hits to Laertes' non. Gertrude toasts him, but drinks from the cup that contains the poisoned wine. As Laertes watches in horror he realizes that their plot will be revealed when she dies, and so slashes at Hamlet with the poisoned foil. There is a scuffle and in the confusion the men switch weapons with each other. Hamlet wounds Laertes with his own poisoned blade. Gertrude collapses, announcing that she has been poisoned, and with his last breaths Laertes tells Hamlet that Claudius has planned his murder. Hamlet rushes Claudius and kills him. Horatio cannot bear to be the last survivor of Elsinore and goes to drink the last of Gertrude's wine, but Hamlet begs him to live, and to tell his story. He dies in Horatio's arms.
Fortinbras arrives at the castle and takes the crown for himself, after ordering a funeral with full military honors for Hamlet.