This is from Hamlet, a Play by William Shakespeare. This line is spoken by Marcellus in Act I, scene iv (67), as Marcellus see the ghost of Hamlet’s father. he ghost beckons Hamlet to follow him, and Hamlet goes-against the advice and pleading of Horatio and Marcellus. After he leaves, they discuss following him, and Marcellus utters these words.
This is used in many other languages and notably in Malayalam (എന്തോ, എവിടെയോ ചീഞ്ഞു നാറുന്നു – Which means, something is rotten somewhere) to portray certain situtions as detailed below.
>What Marcellus means is that something has occurred in Denmark that is nefarious.His comment also alludes to Denmark’s corrupt ruling class and unjust administration.
>The phrase “something is rotten in the state of Denmark” is used quite often today to refer to “dirty politics.” When corruption is apparent, this phrase is often used to refer to the “rotten” circumstances.
>Also, it is unsed in a situation in which something is wrong.