Act I:
Count Orsino of Illyria is introduced; he laments that he is lovesick, and wishes that "if music be the food of love," he could kill his unrequited love through an overdose of music. Orsino's servant Valentine, whom Orsino sent to give his affections to Olivia, returns; Valentine was not allowed to speak directly to Olivia, but Olivia sent a message, via her handmaiden, that Olivia will continue to mourn her dead brother, and will neither allow Orsino to see her or to woo her.
Viola lands in Illyria, after a terrible shipwreck in which she was separated from her twin brother, Sebastian. Viola hopes that her brother was saved, as she was; the Captain, who also managed to get ashore, tries to console her of the hopes of finding her brother alive. The Captain recalls seeing her brother in the water after the shipwreck, clinging onto a mast, and riding above the waves. As it happens, the Captain is from Illyria, and tells Viola of Count Orsino, and of his love for Lady Olivia; the Captain also mentions Olivia's recent loss of both her father and her brother, and Viola, having lost her brother as well, commiserates with Olivia's situation. Viola proposes that she serve Orsino, since he is a good and just man; she conspires with the Captain that she may be presented to Orsino as a eunuch, and that her true identity as a foreign woman be concealed. The Captain agrees to help her, and he leads her to Orsino.
Sir Toby, Olivia's drunken uncle, is approached by Olivia's handmaiden, Maria, about his late hours and disorderly habits. Maria also objects to one of Sir Toby's drinking buddies, Sir Andrew Aguecheek, a rather foolish man who Sir Toby has brought as a potential suitor to Olivia. Sir Toby has great affection for Sir Andrew, but Maria does not; she believes that Sir Andrew is a drunkard and a fool, and not to be suffered. Sir Toby attempts to introduce Sir Andrew to Maria; wordplay ensues from a series of misunderstandings, puns, and differing usages of words. Maria exits, and Sir Toby and Sir Andrew continue to quibble, with some amusing results; at last, they decide to start drinking.
Viola has now disguised herself as a boy, Cesario, and has been taken into the service of Count Orsino. Valentine remarks that Orsino and Viola, as Cesario, have become close in the short time that Viola has been employed; indeed, Orsino has already told Viola of his great love for Olivia. Orsino asks Viola to go to Olivia and make Orsino's case to the lady; Viola says she will obey, although she confesses in an aside that she already feels love for Orsino, and would rather be his wife than try to woo Olivia for him.
Feste first appears in the play in Act I. Olivia enters, with her attendants, and is somewhat displeased and short with Feste; Feste says she is a fool for mourning her brother, if she knows that her brother is in heaven. Viola/ Cesario arrives at Olivia's house, and is admitted after much waiting, and being examined by both Sir Toby and Malvolio. Viola is brought in to meet Olivia, who finds out Viola is a messenger on Orsino's behalf, and Olivia discourages Viola from wooing her for the Count. Viola tries to make Orsino's suit, but is unsuccessful; Olivia begins to show interest in Viola as Cesario in this scene. Viola is sent away at last, and Olivia has Malvolio go after Viola, with a ring and an invitation to come back tomorrow.
Act II:
Sebastian, Viola's brother, is shown alive, and in the company of Antonio, a somewhat shady sea-captain. Sebastian tells Antonio of his sister, Viola, who he fears has been drowned; he thanks Antonio for his kindness in saving him and resolves that he must be off alone.
Malvolio catches up to Viola, with the ring he was instructed to give Viola by Olivia. Viola is surprised, since she left no ring with Olivia; Malvolio grows impatient with Viola, throws it down onto the ground, and storms off. Viola realizes that the ring is proof that Olivia has some affection for her as Cesario; she regrets that Olivia is in love with her disguise, as that will come to nothing, and also that she is in love with her master, but that she can do nothing in her present disguise.
Sir Toby and Sir Andrew are up late, drinking, and Feste joins them. They proceed to make a great deal of noise, by singing, drinking, and talking nonsense; Maria tries to get them to be quiet, but Malvolio is awakened by the noise, and comes down to berate them for disturbing the household. Once Malvolio leaves, Maria concocts a plan to make Malvolio look like a complete fool: she will write love letters to Malvolio and make it look like the letters have come from Olivia. The party decides to try this out and see if it will work; Maria leaves to go to bed, and Sir Toby and Sir Andrew decide to drink the rest of the night away.
Orsino calls upon Feste to sing an old song, that pleases him very well; Orsino then begins to talk to Viola/ Cesario of love, and its imperfections. Orsino compares women to roses "whose fair flower/ being once displayed, doth fall that very hour"; Viola does not approve of Orsino's slightly cynical view of women.
Viola attempts to soothe Orsino's melancholy by getting him to accept that Olivia might not love him, but that perhaps another woman does; Orsino counters this with the argument that women are very inconstant in their love, and could not have a feeling as deep as the love he has for Olivia. Viola knows that this is not true, in light of the great amount of feeling she has for Orsino; she attempts to persuade him that women are "as true of heart" as men, by telling him a story she makes up about a sister that loved only too constantly and too well. Orsino asks Viola to go again to Olivia, and make his suit; Viola obeys.
Maria appears, with the love-letter she has written for the purposes of baiting Malvolio. Sir Toby, Sir Andrew, and their friend Fabian are present; they hide behind a tree as Malvolio approaches, and Maria places the letter somewhere where he is certain to find it. Malvolio approaches, already muttering nonsense about thinking that Olivia fancies him, and about how things would be if they were married; this angers Sir Toby and Sir Andrew, who want to beat Malvolio for his pretension. Malvolio finally spots the letter, and thinks he recognizes the handwriting as Olivia's; he takes the bait completely.
Act III:
Viola enters, on her way to see Olivia; she comes across Feste, who is full of wit and foolery as usual. Feste expresses his dislike for Viola, which Viola does not take personally; Viola gives him a few coins for his wordplay, and mentions the wit that it takes to act the fool as well as Feste does. Olivia then comes to meet Viola, and Viola again attempts to make Orsino's case.
Olivia confesses her affection for Viola/ Cesario, and begs to know if Viola does indeed feel the same way. Viola says no, then asks again if Olivia will have anything to do with Orsino; Olivia is constant in her lack of response to Orsino, but makes one last attempt to win Cesario over. Viola warns Olivia as best she can, telling Olivia that "I am not what I am," though Olivia does not guess at the statement's real meaning (III.i.139). Viola leavesbut not without an entreaty to return.
Sir Andrew finally comes to his senses, realizing that Olivia favors. His friend Fabian tries to convince him that Olivia is just trying to make him jealous; this does not soothe Sir Andrew's anger. Sir Toby then persuades Sir Andrew that he should challenge Cesario to a duel. Sir Toby tells him to write a letter of challenge, which Sir Toby will deliver; Toby actually has no intent of sponsoring a duel, but thinks the exercise might cool Sir Andrew off a little.
Antonio fears some accident may happen to Sebastian since he is completely ignorant of the country. Sebastian wants to go about and see the sights, but Antonio tells him that he cannot; Antonio confesses that he was involved with some piracy against Illyria, and that he is wanted by the Count because of it. Antonio proposes that they meet up at an inn in one hour, and that Sebastian can wander about until then.
Maria warns Olivia of Malvolio's very strange behavior; Malvolio is wearing yellow, cross-gartered stockings, which Olivia abhors. Malvolio continues his absurdity, making remarks of unwarranted familiarity, and completely baffling Olivia with his misguided attempts to be amorous toward her. Olivia dismisses Malvolio's odd behavior as being some kind of passing madness, and orders that Malvolio be looked after.
Sir Toby, Maria, and Fabian approach Malvolio; they treat Malvolio's case as an instance of witchcraft or possession. Not satisfied with the havoc they have already caused, they decide to make Malvolio go mad, if they can. Sir Andrew returns, with his "saucy" letter for Cesario, and Viola as Cesario appears, having patched up any bad feelings with Olivia over their last, dramatic scene.
Sir Toby conveys Sir Andrew's challenge to Viola, and tries to make Viola shrink from the confrontation by greatly exaggerating Sir Andrew's meanness and anger. Sir Andrew and Viola come close to some sort of reluctant confrontation, when Antonio stumbles on them; Antonio is arrested by officers of the Count, and asks Viola for his purse, mistaking Viola for her brother Sebastian. Antonio is taken aback when Viola will not give him his purse, thinking that she, as Sebastian, is ungrateful for his help; he speaks of rescuing Sebastian from drowning, which lets Viola know that her brother might be alive. Viola hopes that what Antonio said is indeed true, and that her brother might have been saved from the wreck.
Act IV:
Feste approaches Sebastian, thinking that Sebastian is 'Cesario'; when Sebastian tells Feste that he does not know him, nor Olivia, whom Feste tells him to meet, Feste becomes rather upset, and accuses Sebastian of "strangeness". Then Sir Andrew comes, and strikes Sebastian out of anger, as if he were Cesario; Sir Toby and Sebastian come close to getting in a duel of their own, when Olivia finds them, and charges them to stop. Olivia dismisses Sir Toby, and asks Sebastian "would thou'dst be ruled by me," thinking that he is Cesario, due to his great resemblance to his sister. Sebastian decides to go along with it, struck by Olivia's beauty, thinking it all a pleasant dream from which he hopes he will not awaken.
Maria and Feste conspire to present Feste as Sir Topaz, the curate, to Malvolio, who is hidden from view. Feste tries to convince that Malvolio that he is crazy, and Malvolio continues to insist that he is not, that he has been wrongly incarcerated. Feste then confronts Malvolio as himself, and torments him some more; he fakes a conversation with himself as Feste and Sir Topaz, and Malvolio begs for paper and ink so that he can send a message to Olivia. Feste promises to fetch these things, and exits with a song.
Sebastian debates with himself whether he is mad, or whether it is the Lady Olivia who is crazy, though this does not stop him. Olivia asks him to come with her to the parson and be married to her; Sebastian, though he is completely confused, goes to be married to her.
Act V:
Fabian asks Feste for the letter Malvolio has written; Feste refuses this request, and then Orsino, with Viola, finds them. Viola points out Antonio, who is being brought to them by officers; Orsino remembers Antonio from a sea-battle, and Viola tries to defend Antonio from charges of crime by noting his kindness to her. Antonio claims that he rescued Viola from drowning, and that they have been in each other's company ever since; Orsino says that this is nonsense, since Viola has been serving him the whole time.
Then, Olivia approaches them, still denying Orsino's love, while admitting her affection for Viola. Orsino becomes angry at Viola, rather than Olivia, because of these developments; he begins to suspect Viola of double-dealings, and out of his anger, he admits his love for Viola, still disguised as a boy. Viola, for the first time, declares her love for Orsino, much to Olivia's consternation; Olivia counters this declaration by divulging that she was married, to Viola as Cesario, she thinks. A priest confirms Olivia's account, and Orsino becomes even more angry at Viola. Sir Andrew and Sir Toby enter, charging Viola with fighting them and injuring them; Viola is again shocked, and confused.
Suddenly, Sebastian dashes in, apologizing for injuring Sir Toby; he expresses his happiness at seeing Antonio again, and acknowledges Olivia as his wife. Viola and Sebastian see each other again, and there is a joyful reunion. Sebastian reveals to Olivia that she married him, rather than his sister in disguise; Orsino swears that he loves Viola, and will marry her.
Then, the action turns to Malvolio's condition; his letter is read, and his condition explained. Malvolio is upset at his mistreatment, and Olivia attempts to smooth things over; Fabian explains his, Sir Toby's, and Maria's part in Malvolio's torment. Then, Feste inflames Malvolio's anger, and he leaves, in a huff.
Orsino pronounces that happiness will stay with all of them, and that his marriage to Viola will soon be performed. Feste closes the play with a song about "the wind and the rain," a reminder that even great happiness is not safe from life's storms.