Claudius has committed the perfect crime and gotten everything he wanted. Yet he is plagued by a guilty conscience, as he reveals in detail when Hamlet finds him trying to pray. In this case, we might think of guilt as fear of punishment. Claudius has two things to be afraid of. One is being exposed as a murderer. The other is fear of being punished in the afterlife. If he is exposed he will be disgraced, probably overthrown, possibly even executed. The person most likely to guess the truth is Hamlet.
Claudius knows Hamlet is not only a man of keen intelligence but that he has spent years acquiring a university education. Hamlet spends much of his time silently brooding alone. Claudius projects his fears of disclosure onto his nephew. He is afraid Hamlet might somehow be able to use his learning to prove that Claudius murdered his brother and explain exactly why and how he did it.
Claudius tells Polonius:
There’s something in his soul O’er which his melancholy sits on brood; And I do doubt the hatch and the disclose Will be some danger (Act III, Scene 1).
Claudius is not afraid Hamlet is plotting a coup. Rather, he is afraid his inscrutable stepson is focusing his intellectual prowess on analyzing the circumstances surrounding the death of his father and his uncle’s usurpation of the throne. Claudius knows he is vulnerable. The story about a snake biting King Hamlet while he was sleeping in his garden sounds pretty phony. Who would benefit from King Hamlet’s death? What about the fellow who ended up with the dead man’s crown, wife, and entire kingdom? Claudius wonders, like most murderers, whether he might have left some clue at the scene of the crime. He is also afraid of betraying his guilt by word or deed. As Gertrude says,
So full of artless jealousy is guilt It spills itself in fearing to be spilt (Act V, Scene 5).
Claudius betrays himself when he flees the performance of the play, and he betrays himself again when he allows himself to be overheard at his prayers by the perspicacious and unnerving son of the man he killed.
For murder, though it have no tongue, will speak With most miraculous organ.
It seems likely that Hamlet, given time, would have solved the mystery of his father’s death on his own. He is already intuitively suspicious of his uncle. When the Ghost tells him what really happened in the garden, Hamlet exclaims,
O my prophetic soul! My uncle!
Hamlet had been sensing that there was something more to his father's death, his uncle's coronation, and the marriage of his uncle and mother than had been explained. There may have been many clues the prince picked up intuitively but hadn't put together until the Ghost gave him the one missing piece of the puzzle. For example, why were his uncle and his mother showing such unusual concern about what he was thinking and feeling? They were disturbed by the fact that he continued to brood and to wear mourning clothes. It showed the case was not yet closed. The past was not entirely in the past where they wanted it to be. Gertrude was not involved in her husband’s murder, but she was concerned about her son’s obvious depression and how his mourning reflected on the new king and herself as his wife.