A Midsummer Night's Dream is first mentioned by Francis Meres in 1598, leading many scholars to date the play between 1594 and 1596. It is likely to have been written around the same period Romeo and Juliet was created. Indeed, many similarities exist between the two plays, so much that A Midsummer Night's Dream at times seems likely to degenerate into the same tragic ending that befalls Romeo and Juliet.
The play was first printed in quarto in 1600, following its entry into the Stationer's Register on October 8, 1600. This quarto is almost surely taken directly from a manuscript written by Shakespeare. A second quarto was printed in 1619 (and falsely backdated to 1600) and attempted to correct some of the errors in the first printing, but also introduced several new errors. It is the second quarto which served as the basis for the First Folio in 1623.
There is a myth that A Midsummer Night's Dream was first performed for a private audience after an actual wedding had taken place. The play's three wedding and play-within-a-play Pyramus and Thisbe certainly would seem to fit the scene, with all the newlyweds retiring to their respective chambers at the end. However, no evidence of this imagined performance exists. Rather, A Midsummer Night's Dream was definitely performed on the London stage by the Lord Chamberlain's Men, and the title page of the first Quarto indicates it was written by William Shakespeare.
The title draws on the summer solstice, Midsummer Eve, occurring June 23 and marked by holiday partying and tales of fairies and temporary insanity. Shakespeare cleverly weaves together not only fairies and lovers, but also social hierarchies with the aristocratic Theseus and the "rude mechanicals," or the artisans and working men. This allows the play to become infinitely more lyrical, since it is able to draw on the more brutal language of the lower classes as well as the poetry of the noblemen.
One of the more interesting changes which Shakespeare introduces is the concept of small, kind fairies. Robin Goodfellow, the spirit known as Puck, is thought to have once been feared by villagers. History indicates the prior to Elizabethan times, fairies were considered evil spirits who stole children and sacrificed them to the devil. Shakespeare, along with other writers, redefined fairies during this time period, turning them into gentle, albeit mischievous, spirits.
The final act of the play, completely unnecessary in relation to the rest of the plot, brings to light a traditional fear of the Elizabethan theater, namely that of censorship. Throughout the play the lower artisans, who wish to perform Pyramus and Thisbe, try to corrupt the plot and assure the audience that the play is not real and that they need not fear the actions taking place. This culminates in the actual ending, in which Puck suggests that if we do not like the play, then we should merely consider it to have been a dream. One of the most remarkable features of A Midsummer Night's Dream is that at the end members of the audience are unsure whether what they have seen is real, or whether they have woken up after having shared the same dream. This is of course precisely what Shakespeare wants to make clear, namely that the theater is nothing more than a shared dream. Hence the constant interruption of that dream in the Pyramus and Thisbe production, which serves to highlight the artificial aspect of the theater. Bottom and his company offer us not only Pyramus and Thisbe as a product of our imagination, but the entire play as well.
Puck's suggestion hides a more serious aspect of the comic fun of the play. There is deep underlying sexual tension between the male and female characters, witnessed by Oberon's attempts to humiliate Titania and Theseus' conquest of Hippolyta. This tension is rapidly dissipated by the sure solution which the play assumes, making it seem less real. However, the darker side of the play should not be ignored, nor the rapid mobility with which the actors transfer their amorous desires from one person to the other.