Viola and Sebastian, twins, are separated during a shipwreck. Viola, thinking her brother dead, finds herself stranded in Ilyria. She disguises herself as a man, Cesario, and enters the service of Duke Orsino, who is in love with Olivia and who sends Viola/Cesario to woo Lady Olivia in his behalf. Orsino does not know that Viola has fallen in love with him. Olivia is indulging in a seven-year season of mourning for a dead brother and is refusing to accept the advances of any man. Her sorrow is not so profound, however, as to keep her from falling in love with the disguised Viola. She is so in love, in fact, that she later sends a Cesario/Viola a ring and invitation to return and then admits her love for “him.”
Of Olivia’s household, only her steward, the melancholy Malvolio, finds a morbid pleasure in the atmosphere of mourning which Olivia has decreed. Her uncle, Sir Toby Belch (who lives in her house), doesn’t believe in grief; he spends his time drinking with Olivia’s clown, Feste, and his dupe, Sir Andrew Aguecheek, a wealthy but foolish knight.
Because Malvolio is so arrogant, Maria, Olivia’s chamber woman, plots with Sir Toby, Aguecheek, and Feste to get even. This they succeed in doing by means of a forged letter supposedly from Olivia, duping Malvolio into wearing yellow stockings cross gartered, which she detests. Malvolio’s unaccountable antics cause Olivia to think him mad, and Sir Toby and Maria have him committed to a dark room.
Meanwhile, Viola’s twin brother, Sebastian, unaware that Viola is still alive, arrives in Ilyria with a sea captain, Antonio, who is an outlawed man in Ilyria. Antonio lends his purse to Sebastian and parts.
Seeking more “sport,” Sir Toby presses Aguecheek and Cesario/Viola into a duel. Antonio rushes to rescue the youth, whom he believes is his friend, Sebastian, and is arrested by the duke’s men and met by Cesario/Viola with a denial that he/she ever saw him or his purse.
Now Aguecheek rushes to complete the duel with Cesario/Viola but encounters Viola’s twin brother instead who quickly wounds the knight. Olivia interferes and leads Sebastian to a priest and (thinking he is Cesario) marries the surprised young man.
Antonio is brought before the duke and creates some confusion by relating his adventures with Cesario/Viola, who he still thinks is Sebastian. Olivia adds to the confusion by entering and claiming Cesario/Viola as her husband.
Sir Andrew and Sir Toby in the meantime have had another encounter with Sebastian; they enter wounded and blame their hurts upon Cesario/Viola. Everything is finally made clear when Sebastian himself appears and the company sees Viola and Sebastian, twins, side by side. Viola promises to assume her maiden attire to prove her identity as Sebastian’s sister. Orsino, remembering Viola’s many expressions of affection, is content to abandon his hopeless love for Olivia and marry Viola. Sir Toby marries Maria for her wit, and only Malvolio remains single and seems dissatisfied with the happiness of the others.