sAs all the Sixteenth and Seventeenth century plays say, a ghost was a common feature in the genre of the Revenge Play, of which HAMLET is a highly developed example. Shakespeare used them in other plays such as, MACBETH and JULIUS CAESAR . Belief in ghosts was common in Shakespeare’s time (though many of the more educated did hold belief in them to be merely superstition). King James I wrote a treatise on demons and ghosts. Different spirits were understood to have different characteristics and meanings. Specifically in HAMLET, I think the ghost has several functions.
Hamlet never doubts the existence of the spirit, only questions whether it is actually his father, and whether its intentions are good or evil. (Can be seen in I. ii. 244-245) That it appears, and in amour, indicates to Hamlet and Marcellus that ‘all is not well’, that ‘something is rotten in the state of Denmark. ’ Claudius has killed the King (Hamlets father) marries his mother and then takes the throne. The ghost first is seen by Marcellus, Bernardo and Horatio, so the way Hamlet faces it is clearly meant to show his bravery. King Hamlet’s ghost speaks only to Hamlet.
The ghost talks to Hamlet made aware of Claudius’ bad deeds, then allows some opportunity to show the relationship between father and son. Hamlet is certainly unhappy with the news of his fathers murder, but his encounter with the ghost must be seen as adding to his anguish and trauma and despair, and plunging him into a whirlpool of insanity and self-doubt. The ghost’s news shakes Hamlet the core, making him aware, in an extremely personal way, of the depths to which mankind can also descend. It is his father’s ghost, which initially pressures Hamlet into taking revenge, and it reiterates the demand in III. v. Though this means killing his uncle and his King but to keep his mother alive, using only daggers in his words, against her. Hamlet never resents being told to do it by the ghost. He sees it as a duty owed to his father and his reason for living. But it goes against his sense of moral and Christian right at least until Act V (V. ii. 63-70). The ghost can therefore be interpreted as a little ambiguous, as regards good and evil. Perhaps the ghost is a parallel to Polonius: a father sacrificing a child to a principle or a perceived greater good.
The ghost doesn’t reappear after Act III, but neither does Polonius. The functions of both are completed. Ophelia goes mad and dies. Hamlet, who was never mad, kills Polonius, comes to terms with death, and thus also with life, finally kills Claudius, and dies himself along with his mother and Laertes. Leaving Horatio to tell his story and Fortinbras to be king of Denmark. This play has many features including, good and evil, life and death, leadership and insanity, as is the true nature of mankind. Without the ghost, Hamlet could not reach that fulfillment of himself.