Hamlet Hamlet , or Hamlet , Prince of Denmark was a tragic historical play written by the Human poet William Shakespeare in the early 17th century . It is widely considered his most famous and most often - quoted play , even into the 23rd and 24th centuries . In 2153 , a day after being provided the play as an example of Earth literature , Vissian Captain Drennik quoted from " Hamlet " Act I , Scene V : " " There are more things in Heaven and Earth than are dreamt of in your philosophy . " " ( ) The Karidian Company of Players ran an interstellar theatrical tour of Shakespearean performances , including " Hamlet " . In 2266 , Anton Karidian had a book of " Hamlet " in his quarters aboard the . Soon thereafter , he and the rest of the theatrical company performed the play aboard the " Enterprise " , providing an ironic parallel to real life , when Karidian was revealed as actually being Governor Kodos . As Kodos ' daughter Lenore Karidian quoted , " " The play ' s the thing , wherein I ' ll catch the conscience of the king . " " ( ) In 2286 , when told that Spock had programmed computer variables for time travel from memory ( shortly following the restoration of his " katra " on , Leonard McCoy exclaimed , " " Angel s and ministers of grace defend us ! " " – which Spock correctly identified as a quote from " Hamlet " , Act I Scene IV . ( ) In 2293 , Klingon general was particularly fond of " Hamlet " , and one line in particular : " " taH pagh taHbe " " ( in English , " " To be or not to be ! " " ) . Chancellor Gorkon also quoted " Hamlet " by making reference to " the undiscovered country " . Though Shakespeare presumably intended the line to be a reference to death , Gorkon more optimistically chose to use it as a reference to the future . Also , the chameloid Martia described her decision to " assume a pleasing shape " , making reference to " Hamlet " Act II , Scene II . ( ) In a conversation with Captain Jean - Luc Picard in 2364 , Q quoted , " " The play ' s the thing " " to describe his need for playing games with the crew . Later in the conversation , Picard defended the Human race by quoting from " Hamlet " , saying , " " What he said with irony , I say with conviction . ' What a piece of work is man ! How noble in reason ! How infinite in faculty . In form , in moving , how express and admirable . In action , how like an angel . In apprehension , how like a god ! " " ( ) In 2366 , when Data was abducted by Kivas Fajo and presumed dead , Geordi La Forge returned Data ' s volume of the complete Shakespeare to Captain Jean - Luc Picard . He read two lines from " Hamlet " Act I , Scene II to himself : Memorable quotes . " Hamlet " is a violent play , about violent times ; when life was cheap , and ambition was god . " " " " I am thy father ' s spirit , doom ' d for a certain term to walk the night , and for the day confined to fast in fires till the foul crimes done in my days of nature are burnt and purged away . But that I am forbid to tell the secrets of my prison - house , I could a tale unfold whose lightest word would harrow up thy soul , freeze thy young blood , make thy two eyes , like stars , start from their spheres , thy knotted and combined locks to part and each particular hair to stand an end like quills upon the fretful porpentine . But the details of this eternal blazon must not be to ears of flesh and blood . " " Appendices . Background information . In the final revised draft script of , the production of " Hamlet " aboard the " Enterprise " was referred to as having " decor carried out in a strange Venus ian version of castle and grounds . " Because of the comment that Chancellor Gorkon made that " you have never experienced Shakespeare until you have read him in the original Klingon , " the Klingon Language Institute has completely translated " Hamlet " to Klingon and sold it to the public as " The Klingon Hamlet " . In 2010 , selections from " Hamlet " and " Much Ado About Nothing " were performed in Klingon by the Washington Shakespeare Company , as part of a fundraiser which also featured George Takei . Many episode titles originate in quotations from " Hamlet " , including , , , the subtitle of , and possibly and . According to the , " Hamlet " was written ca . 1600 .