The play consists of four interconnecting plots, connected by a celebration of the wedding of Duke Theseus of Athens and the Amazon queen, Hippolyta, which are set simultaneously in the woodland and in the realm of Fairyland, under the light of the moon.
The play opens with Hermia, who is in love with Lysander, resistant to her father Egeus's demand that she wed Demetrius, whom he has arranged for her to marry. Helena, Hermia's best friend, pines unrequitedly for Demetrius, who broke up with her to be with Hermia. Enraged, Egeus invokes an ancient Athenian law before Duke Theseus, whereby a daughter needs to marry a suitor chosen by her father, or else face death. Theseus offers her another choice: lifelong chastity as a nun worshipping the goddess Artemis.
Peter Quince and his fellow players Nick Bottom, Francis Flute, Robin Starveling, Tom Snout and Snug plan to put on a play for the wedding of the Duke and the Queen, "the most lamentable comedy and most cruel death of Pyramus and Thisbe". Quince reads the names of characters and bestows them on the players. Nick Bottom, who is playing the main role of Pyramus, is over-enthusiastic and wants to dominate others by suggesting himself for the characters of Thisbe, the Lion, and Pyramus at the same time. Quince insists that Bottom can only play the role of Pyramus. Bottom would also rather be a tyrant and recites some lines of Ercles. Bottom is told by Quince that he would do the Lion so terribly as to frighten the duchess and ladies enough for the Duke and Lords to have the players hanged. Snug remarks that he needs the Lion's part because he is "slow of study". Quince assures Snug that the role of the lion is "nothing but roaring." Quince then ends the meeting telling his actors "at the Duke's oak we meet".
In a parallel plot line, Oberon, king of the fairies, and Titania, his queen, have come to the forest outside Athens. Titania tells Oberon that she plans to stay there until she has attended Theseus and Hippolyta's wedding. Oberon and Titania are estranged because Titania refuses to give her Indian changeling to Oberon for use as his "knight" or "henchman", since the child's mother was one of Titania's worshippers. Oberon seeks to punish Titania's disobedience. He calls upon Robin "Puck" Goodfellow, his "shrewd and knavish sprite", to help him concoct a magical juice derived from a flower called "love-in-idleness", which turns from white to purple when struck by Cupid's arrow. When the concoction is applied to the eyelids of a sleeping person, that person, upon waking, falls in love with the first living thing they perceive. He instructs Puck to retrieve the flower with the hope that he might make Titania fall in love with an animal of the forest and thereby shame her into giving up the little Indian boy. He says, "And ere I take this charm from off her sight,/As I can take it with another herb,/I'll make her render up her page to me."
Hermia and Lysander have escaped to a forest in hopes of running away from Theseus. Helena, desperate to reclaim Demetrius's love, tells Demetrius about the plan and he follows them in hopes of finding Hermia. Helena continually makes advances towards Demetrius, promising to love him more than Hermia. However, he rebuffs her with cruel insults against her. Observing this, Oberon orders Puck to spread some of the magical juice from the flower on the eyelids of the young Athenian man. Instead, Puck mistakes Lysander for Demetrius, not having actually seen either before, and administers the juice to the sleeping Lysander. Helena, coming across him, wakes him while attempting to determine whether he is dead or asleep. Upon this happening, Lysander immediately falls in love with Helena. Helena, thinking Lysander is playing a trick on her, runs away with Lysander following her. When Hermia wakes up, she sees that Lysander is gone and goes out in the woods to find him. Oberon sees Demetrius still following Hermia, who thinks Demetrius killed Lysander, and is enraged. When Demetrius goes to sleep, Oberon sends Puck to get Helena while he charms Demetrius' eyes. Upon waking up, he sees Helena. Now, both men are in love with Helena. However, she is convinced that her two suitors are mocking her, as neither loved her originally. Hermia finds Lysander and asks why he left her, but Lysander claims and denies he never loved Hermia, but Helena. Hermia accuses Helena of stealing Lysander away from her while Helena believes Hermia joined the two men in mocking her. Hermia tries to attack Helena, but the two men protect Helena. Lysander, tired of Hermia's presence, insults her and tells her to leave. Lysander and Demetrius decide to seek a place to duel to prove whose love for Helena is the greater. The two girls go their own separate ways, Helena hoping to reach Athens and Hermia chasing after the men to make sure Lysander doesn't get hurt or killed. Oberon orders Puck to keep Lysander and Demetrius from catching up with one another and to remove the charm from Lysander so Lysander can return to love Hermia, while Demetrius continues to love Helena.
Meanwhile, Quince and his band of six labourers ("rude mechanicals", as they are described by Puck) have arranged to perform their play about Pyramus and Thisbe for Theseus' wedding and venture into the forest, near Titania's bower, for their rehearsal. Quince leads the actors in their rehearsal of the play. Bottom is spotted by Puck, who (taking his name to be another word for a jackass) transforms his head into that of a donkey. When Bottom returns for his next lines, the other workmen run screaming in terror: They claim that they are haunted, much to Bottom's confusion. Determined to await his friends, he begins to sing to himself. Titania, having received the love-potion, is awakened by Bottom's singing and immediately falls in love with him. She lavishes him with the attention of her and her fairies, and while she is in this state of devotion, Oberon takes the changeling. Having achieved his goals, Oberon releases Titania, orders Puck to remove the donkey's head from Bottom, and arranges everything so Helena, Hermia, Demetrius and Lysander will all believe they have been dreaming when they awaken. Puck distracts Lysander and Demetrius from fighting over Helena's love by mimicking their voices and leading them apart. Eventually, all four find themselves separately falling asleep in the glade. Once they fall asleep, Puck administers the love potion to Lysander again, returning his love to Hermia again, and claiming all will be well in the morning.
The fairies then disappear, and Theseus and Hippolyta arrive on the scene, during an early morning hunt. They find the lovers still sleeping in the glade. They wake up the lovers and, since Demetrius no longer loves Hermia, Theseus over-rules Egeus's demands and arranges a group wedding. The lovers at first believe they are still in a dream and can't recall what has happened. The lovers decide that the night's events must have been a dream. After they exit, Bottom awakes, and he too decides that he must have experienced a dream "past the wit of man".
At Quince's house, he and his team of actors worry that Bottom has gone missing. Quince laments that Bottom is the only man who can take on the lead role of Pyramus. Bottom returns, and the actors get ready to put on "Pyramus and Thisbe."
In Athens, Theseus, Hippolyta and the lovers watch the six workmen perform Pyramus and Thisbe. The performers are so terrible playing their roles that the guests laugh as if it were meant to be a comedy, and everyone retires to bed. Afterwards, Oberon, Titania, Puck, and other fairies enter, and bless the house and its occupants with good fortune. After all the other characters leave, Puck "restores amends" and suggests that what the audience experienced might just be a dream.