Measure for Measure was written during the same period as Shakespeare's great tragedies: 1601 to 1608. In this brief time span, he wrote Hamlet, Othello, King Lear, and Macbeth, as well as Julius Caesar, Timon of Athens, Coriolanus, and Antony and Cleopatra. Critics frequently point out that Measure for Measure could easily have been a tragedy itself. The plot, the characters, and the setting are all potentially tragic. The happy ending is so sudden as to seem contrived, leaving critics to speculate that the play was meant for a tragedy and was turned to comedy at the last moment. Perhaps the poet was so immersed in his tragic masterpieces that their mood was reflected in this work. Or he may have experienced dark and bitter times in his personal life at this period. Audience demands may have influenced him to make comedy of tragic material. Pulled away from his major works to write it, he gave it less than his best. While these variously advanced ideas are no more than speculation, many critics do agree that the play has no consistency of mood, the subject matter is more tragic than comic, and the final scene is jarring.
Measure for Measure is often treated with All's Well That Ends Well and Troilus and Cressida. Written during the great tragic period, they are often called "bitter" or "dark comedies." They are also known as the "problem comedies" because they examine a grave problem of human existence in a style which is more serious than usual for comedy, yet not strictly tragic either. The play is preceded by Shakespeare's great comedies and is followed by the romances.
All's Well That Ends Well, written about 1598, or six years previous to Measure for Measure, turns on the same dramatic device, the substitution of one bed partner for another. Critics point out that while this works well as a part of the plot in All's Well, in Measure for Measure it seems tacked on. In need of a convenient way to prevent the necessity of Isabella's giving way to Angelo's lewd demands, the author recalled the bed trick from his earlier work and simply inserted it.
Like Measure for Measure, Othello found its source in Cinthio's Hecatommithi. Written in the same year, it was introduced at court in November 1604, a few weeks before Measure for Measure.
The play also bears a noticeable resemblance to Hamlet in two of its passages. Angelo's speech on prayers is often compared to that of King Claudius in Hamlet. The inability of a conscience heavy with guilt to give sincerity to prayer is expressed by Angelo in Act II, Scene 4:
When I would pray and think, I think and pray
To several subjects. Heaven hath my empty words;
Whilst my invention, hearing not my tongue,
Anchors on Isabel: Heaven in my mouth,
As if I did but only chew his name;
And in my heart the strong and swelling evil
Of my conception.
Angelo's words clearly recall King Claudius' struggle to pray in Act III, Scene 3, lines 97-98 of Hamlet:
My words fly up, my thoughts remain below.
Words without thoughts never to heaven go.
Claudio expresses his fears of the unknown in death to his sister Isabella in a speech which clearly echoes Hamlet's famous soliloquy in III. i. 56-88 ("To be, or not to be . . ."):
Ay, but to die, and go we know not where;
To lie in cold obstruction and to rot;
This sensible warm motion to become
A kneaded clod; and the delighted spirit
To bathe in fiery floods, or to reside
In thrilling region of thick-ribbed ice;
To be imprison'd in the viewless winds,
And blown with restless violence round about
The pendent world; or to be worse than worst
Of those that lawless and incertain thought
Imagine howling: 'tis too horrible!
The weariest and most loathed wordly life
That age, ache, penury and imprisonment
Can lay on nature is a paradise
To what we fear of death. (III. i. l16-32)