When King Hamlet appears to his son as a Ghost, revealing that he did not die of snakebite but was murdered by his own brother Claudius, and urges Hamlet to avenge his death:
“Revenge his foul and most unnatural murder”
“Hamlet” Shakespeare
Hamlet quickly develops a strong desire to avenge the death of his father, believing that it is his destiny to do so
“born to set [the circumstances of King Hamlet’s death] right”
“Hamlet” Shakespeare
As Hamlet plans to take revenge on Claudius, his mission is made difficult when his mother, Gertrude, hastily marries her brother-in-law. This makes Hamlet suspect that his mother had helped Claudius to murder her husband. He stages the play ‘The Mousetrap’ to check Claudius’ reaction
“The play’s the thing wherein I’ll catch the conscience of the king”
“Hamlet” Shakespeare
Seeing Claudius’ guilty reaction, all remaining doubts of Hamlet vanish, and he vows to kill Claudius, while he will not harm Gertrude {in response to the Ghost’s request during the second appearance} physically, but will instead attack her by using strong words
will “speak daggers”
“Hamlet” Shakespeare
Hamlet gets a chance to kill Claudius soon after the play when the latter is kneeling and praying but chooses to needlessly delay instead of not killing him for fear that the pious activity would send the murderer’s soul to heaven instead of hell. During a heated dialogue with Gertrude in her chambers, Hamlet thinks he has stabbed Claudius, who was spying on them from behind a curtain, but the victim turns out to be Polonius.
In the end, however, Hamlet manages to avenge his father’s death. Even though he is killed in the end by Laertes, Hamlet manages to stab Claudius with the poisoned sword before dying. Hamlet, therefore, dies happily, knowing that he has taken total revenge for his father’s murder. He has not only killed King Claudius with the poisoned sword, but in addition, the death of Gertrude when she mistakenly drinks the poisoned wine a little while earlier, is, to her dying son who never stopped suspecting her of being somehow involved in his father’s death, the completion of total revenge for King Hamlet’s death.