Viola and her twin brother Sebastian have been shipwrecked; each believes the other to be drowned. Viola disguises herself as a young man and, under the name of Cesario, gets a job as a servant for the Duke, Orsino.
A love triangle
Orsino is in love with Olivia, but she's mourning for her dead brother, so has rejected all his advances so far. He sends Cesario (who is really Viola) with love letters to woo Olivia on his behalf. Unfortunately for the Duke, Olivia is taken in by Cesario’s disguise and falls in love with him.
Viola has secretly fallen in love with Orsino, and Orsino is confused by his feelings for his new ‘male’ servant. So, Viola loves Orsino, Orsino loves Olivia and Olivia loves Cesario/Viola.
Olivia’s butler, Malvolio, disapproves of all the other members of her household – her drunken uncle Sir Toby Belch, his friend Sir Andrew Aguecheek and her servants, Maria, Feste and Fabia. Fed up with Malvolio constantly spoiling their fun, they decide to play a practical joke on him.
Malvolio is secretly in love with Olivia, and the others trick him into believing that these feelings are returned. Maria forges a letter to Malvolio, supposedly from Olivia, suggesting that she loves him and he should wear yellow stockings and smile all the time. Malvolio does as the letter suggests, and Olivia thinks he has gone mad, so has him locked up.
Viola's brother, Sebastian, who believes his sister is dead, arrives with his friend and protector, Antonio, who rescued him from the shipwreck.
Sebastian meets Olivia. She mistakes him for Cesario and asks him to marry her, he agrees.
Confusion, coupling and a happy ending
Lots of confusion follows around the mistaken identity of Sebastian and Cesario, and exactly who is promised to whom. Eventually all is revealed, the brother and sister are reunited and the love triangle is resolved into two couples, Sebastian and Olivia, and Viola and Orsino.
Finally, Viola discovers the trick that has been played on Malvolio, and he's released from confinement.