The play is set in a duchy in France, but most of the action takes place in a location called the Forest of Arden..'
Frederick has usurped the Duchy and exiled his older brother, Duke Senior. The Duke's daughter Rosalind has been permitted to remain at court because she is the closest friend and cousin of Frederick's only child, Celia. Orlando, a young gentleman of the kingdom who has fallen in love at first sight of Rosalind, is forced to flee his home after being persecuted by his older brother, Oliver. Frederick becomes angry and banishes Rosalind from court. Celia and Rosalind decide to flee together accompanied by the jester Touchstone, with Rosalind disguised as a young man.
Rosalind, now disguised as Ganymede, and Celia, now disguised as Aliena, arrive in the Forest of Arden, where the exiled Duke now lives with some supporters, including "the melancholy Jaques," who is introduced to us weeping over the slaughter of a deer. "Ganymede" and "Aliena" do not immediately encounter the Duke and his companions, as they meet up with Corin, an impoverished tenant, and offer to buy his master's rude cottage.
Orlando and his servant Adam (a role possibly played by Shakespeare himself, though this story may be apocryphal), meanwhile, find the Duke and his men and are soon living with them and posting simplistic love poems for Rosalind on the trees. Rosalind, also in love with Orlando, meets him as Ganymede and pretends to counsel him to cure him of being in love. Ganymede says "he" will take Rosalind's place and "he" and Orlando can act out their relationship.
Meanwhile, the shepherdess Phebe, with whom Silvius is in love, has fallen in love with Ganymede (actually Rosalind), though "Ganymede" continually shows that "he" is not interested in Phebe. The cynical Touchstone has also made amorous advances towards the dull-witted goat-herd girl Audrey, and attempts to marry her before his plans are thwarted by the intrusive Jaques.
Finally, Silvius, Phebe, Ganymede, and Orlando are brought together in an argument with each other over who will get whom. Ganymede says he will solve the problem, having Orlando promise to marry Rosalind, and Phebe promise to marry Silvius if she cannot marry Ganymede. The next day, Ganymede reveals himself to be Rosalind, and since Phebe has found her love to be false, she ends up with Silvius.
Orlando sees Oliver in the forest and rescues him from a lioness, causing Oliver to repent for mistreating Orlando (some directors treat this as a tale, rather than reality). Oliver meets Aliena (Celia's false identity) and falls in love with her, and they agree to marry. Orlando and Rosalind, Oliver and Celia, Silvius and Phebe, and Touchstone and Audrey all are married in the final scene, after which they discover that Frederick has also repented his faults, deciding to restore his legitimate brother to the dukedom and adopt a religious life. Jaques, ever melancholy, declines their invitation to stay in the forest with them and also decides to adopt a religious life.