To spare Sir Toby grief, in case the letter Malvolio wrote reaches Olivia, and the prank that he, Sir Toby, and Maria played against Malvolio comes to light, Fabian tries in vain to obtain the letter that Malvolio wrote, which is now in Feste’s possession. It wouldn’t be implausible to think that Fabian would persist in trying to obtain the letter while Feste would persist in denying Fabian his desired object ad infinitum were it not for Orsino who is with Cesario and his attendants and who interrupts Fabian and Feste, making a point of greeting Feste as his friend for their past associations. (Feste sang songs for Orsino.) Ever the wit and wordsmith, Feste astounds the Duke with an argument that undermines the presumption that a friend is a good thing, prompting the Duke to commend Feste with payment in gold. When Feste continues to astound him obliging him to clumsily play along and repeatedly pay, the Duke makes his stand and orders Feste to go get Olivia for him.
Not long after Feste leaves, Antonio, who is in custody of the Duke’s officers, arrive. Cesario identifies Antonio as the man who had interceded on his behalf vis-à-vis Sir Andrew. When the Duke, who supposes Antonio as his inveterate enemy from years past, a supposition his officers confirm, denounces Antonio for daring to set foot on Illyria on the assumption that Antonio’s daring couldn’t be for any other reason than to undermine the Illyrian state, Antonio tells his side of the story, justifying his intent for being in Illyria and denouncing Cesario for betrayal and cowardice. He adds that he and Cesario has been in each others’ company for the past three months, which doesn’t make any sense as Cesario has been serving the Duke during that time.
Anon, Olivia arrives with her attendants and thereby ensues another irreconcilable contradiction. As a measure of revenge for spurning his love, the Duke, who knows that Olivia is in love with Cesario, will deny Olivia all commerce with Cesario, presuming that Cesario himself will agree to the measure. Cesario agrees to the measure, avowing his love and loyalty to the Duke is for all time only to find himself between a rock and a hard place when Olivia sends for the priest who vouches for Olivia’s claim that she and Cesario had exchanged holy vows, making Cesario Olivia’s husband by law.
The situation is further complicated when Sir Andrew appears on the scene and denounces Cesario for beating Sir Toby who presently appears drunk and despondent. Having confirmed that Cesario had indeed beaten him, Toby, with Feste, Sir Andrew, and Fabian in tow, goes in search of the surgeon to see to his injuries.
Presently, Sebastian appears, astounding everyone what with his exact likeness to Cesario. Sebastian is relieved to see Antonio who directs Sebastian’s attention to Cesario. Astounded, Sebastian questions Cesario who reveals that he is actually a she, that her name is Viola, that her father is Sebastian of Messalina, and that she had a brother named Sebastian who she was sure had drowned at sea. Brother and sister unite.
Though it becomes apparent that Olivia had married Sebastian thinking he was Cesario, she will gladly take Sebastian as her spouse; the feeling is mutual. Seeing how the situation may be to his benefit as well, the Duke claims Viola as his wife, if Viola will have him. She will have him, proving that her avowals of love and loyalty for Orsino that she expressed while she was Cesario were no fluke. Presently, Viola calls for the Captain, who she notes has been lately engaged on some business involving Malvolio, to aid her transform back to Viola’s likeness. Mention of Malvolio reminds Olivia of Malvolio’s odd behavior of late, and to straighten it out once and for all she orders her attendants to go fetch Malvolio.
By and by, light is shed on Malvolio’s odd behavior by Feste and Fabian who appear with Malvolio’s letter. In it Malvolio challenges Olivia to deny that it was she who had urged him to act out as he had been and for which he has been wrongly abused. Olivia is perplexed but not for long as Malvolio himself appears and presents Olivia the letter with which she had presumably ordered him to smile, to be cross gartered, to wear yellow stockings, and to look down upon Sir Toby and her attendants. Olivia informs Malvolio that the letter‘s handwriting, though it looks like Olivia’s, is actually Maria’s, that Malvolio has been notoriously abused, and that she would make certain that Malvolio will get his day in court where he will be both plaintiff and judge. Fabian begs Olivia to forgive and forget, however, admitting that he and Sir Toby were the principle schemers, that Maria only went along at their urging, and that laughter was in balance the prank’s net effect, not tears or serious injury.
Thus put, Olivia can’t help but to agree, embittering Malvolio.