Measure for Measure is believed to have been written in 1603 or 1604. The play was first published in 1623 in the First Folio.
In their book Shakespeare Reshaped, 1606–1623, Gary Taylor and John Jowett argue that part of the text of Measure that survives today is not in its original form, but rather the product of a revision after Shakespeare's death by Thomas Middleton. They present stylistic evidence that patches of writing are by Middleton, and argue that Middleton changed the setting to Vienna from the original Italy. David Bevington disagrees, noting that the text can be stylistically credited to the professional scrivener Ralph Crane, who is usually credited for some of the better and unchanged texts in the Folio like that of The Tempest.
It is generally accepted that a garbled sentence during the Duke's opening speech (lines 8-9 in most editions) represents a place where a line has been lost, possibly due to a printer's error. Because the folio is the only source, there is no possibility of recovering it.