Hamlet dies at the end of Shakespeare's play in Act 5, Scene 2. He is fatally wounded by a poisoned sword during a fencing match with Laertes. The sword was deliberately poisoned by King Claudius, who conspired with Laertes to kill Hamlet and secure his own reign. During the duel, Laertes wounds Hamlet with the poisoned blade, but they end up exchanging swords, and Hamlet also wounds Laertes with the same poisoned weapon. Meanwhile, Queen Gertrude accidentally drinks poisoned wine intended for Hamlet and dies. Before dying, Laertes reveals Claudius's plot, and Hamlet kills Claudius by stabbing him with the poisoned sword and forcing him to drink the poisoned wine. Hamlet then succumbs to the poison and dies in the arms of his friend Horatio, asking him to tell his story