The ghost in Hamlet, much like the ghosts or witches that appeared to Macbeth spoke out only what was in his mind, and revealed his inner thoughts to the audience better than any words of his could do, performs an important dramatic function by rendering objective what is in the minds of the characters. The ghost in Hamlet discloses to the audience the suspicions already in the minds of Hamlet and his friends.
The motive for the revenge theme of the play is provided by the Ghost. The awful revelation of the Ghost forms the source of the tragedy and the spring of the action. Thus the supernatural is made the starting point of the play. The revelation of the Ghost intensifies the horror that Hamlet felt at the over hasty marriage of his mother with Claudius. The foul play that Hamlet suspected becomes a reality and he is charged by the spirit of his dead father to avenge his fathers murder of which he is incapable. The duty is thus imposed on Hamlet and his failure to carry it out in proper time form the substance of the tragedy.
With the Ghosts description of Claudius and Gertrude, Hamlet as well as the spectators comes to know them in their true colours. Hence Hamlet condemns Claudius as smiling damned villian and Gertrude as a most pernicious woman in his soliloquy.
The Ghost succeeds in producing a moral effect upon Claudius and Gertrude. Because of Hamlets behaviour, Claudius suspects his nature and feels sorry for his own crime. Gertrude is made to look into herself, through the words of Hamlet who reproaches her for her frailty. The Ghosts appearance accounts for Hamlets feigned madness and his getting the play The Mousetrap enacted in order to carry out the entrusted work of the Ghost successfully.
Second Appearance of the Ghost
The second appearance emphasises Hamlets delay in executing the Ghosts order and Gertrudes conviction about Hamlets madness. Verity says that the Ghosts second appearance hastens the denouement by whetting Hamlets blunted purpose and exciting in him, through the bitterness of self-reproach, a mood of increased desperation which alarms Claudius and stimulates him to bring matters to a speedy crisis.
Symbolically too, the Ghost diffuses an atmosphere of awe through which the tragedy looms more impressive. It is a reminder of the existence and immanence of more things in heaven and earth than are dreamt of in our daily philosophy; a warning that at all times, but most in its lapses, humanity has to reckon with not flesh and blood alone but principalities and powers of the unseen world. The Ghost, we feel, is a representative of that hidden ultimate power which rules the universe and the messenger of the divine justice.