In the play, a ghost, a spiritual being in the form of Hamlet's father, called for Hamlet to avenge his murder at the hands of his brother, Claudius, who was now the King of Denmark. The play then focused on Hamlet's search for the truth as he decided whether or not to take revenge on Claudius. To this end, Hamlet staged a play mirroring the manner in which Claudius supposedly murdered Hamlet's father, believing Claudius' reaction will betray his guilt. As Hamlet exclaimed, "The play's the thing in which I'll catch the conscience of the king!"
Hamlet's story was presented in the ship's theater aboard the USS Enterprise in 2266, when Anton Karidian portrayed the ghost and an second actor in the Karidian Company was Hamlet. During the performance, Lenore Karidian accidentally killed her own father, Anton Karidian, after the latter was revealed to be the infamous Governor Kodos. With her dead father in her arms, the insane Lenore paraphrased Hamlet, stating "There's no time to sleep. The play. The play. The play's the thing, wherein we'll catch the conscience of the king." (TOS: "The Conscience of the King")