In Shakespeare's Hamlet, the noble Prince of Denmark is corrupted by the evil that exists within Elsinore Castle.
At the beginning of the play, through the appearance of Old Hamlet's ghost, Hamlet learns that his father has been murdered by his uncle, Claudius, who has not only taken his brother's throne, but married Old Hamlet's widow, Hamlet's mother.
Hamlet's love of his family is paramount to all else. Though perhaps older than we might expect, Hamlet has been attending the university when he is called home at his father's sudden death. Quickly he finds much about the castle has changed, which he must face while he deeply mourns the loss of his father, who was dear to him.
Hamlet hates seeing Claudius with his mother, remembering clearly the complete dedication his parents had once for one another. Not only does Hamlet feel Gertrude has betrayed his father's memory, but she has also betrayed her son.
Because the Elizabethans believed that when a man and woman married, they become one—each sharing the essence of the other— for a brother to marry his sister-in-law was considered an incestuous relationship. Before Hamlet even learns of the truth of his father's death, he sees him mother living in a sinful, incestuous marriage. The fact that this repels him indicates to the audience that he is a morally centered, noble man.
When he learns that his father has been murdered, the noble prince promises to avenge his father's death. However, in terms of the supernatural, the Elizabethans also believed that to kill a King wrongfully was a sin against God: Hamlet could go to hell. The people of Shakespeare's time also believed that creatures did exist to serve the "powers of darkness," and that the ghost might be an evil apparition sent to trick Hamlet unto his eternal damnation. He is particularly torn between fulfilling the promise made to his father's ghost or losing his soul.
Driven by his desire to be a loyal son, Hamlet concocts a plan to pretend to be mad in order to ferret out the truth. However, in order to do this, he destroys the one innocent person in his inner circle: Ophelia. He acts insane, spurns her and insults her because he does not trust her. Between Hamlet's rejection and the conniving behaviors of the King and her father Polonius, she becomes a victim. Hamlet's mistaken murder of her father drives her into madness; ultimately she drowns.
At this point, the corruption of his love for Ophelia, and her ensuing madness blacken Hamlet's soul. He is so immeshed in the evil that flows through the castle, at Claudius' hand, that the noble young man falls victim himself to Claudius' machinations and murder.
And while I believe Hamlet teeters on the edge for a short time, the realization that Claudius would sacrifice Gertrude to his own ends, by allowing her to drink poison meant for Hamlet, drives him close to mad at the end when he forces Claudius to drink the poisoned wine, and then stabs him with the envenomed sword.
It is possible that had Hamlet followed the noble behavior of Young Fortinbras, even enlisting Old Norway's assistance in finding out the truth about his father's fate, Hamlet might not have lost himself to the poisonous atmosphere Claudius created upon murdering his brother and taking his place.