Shipwrecked in a storm at sea, twins Viola and Sebastian are washed ashore on different parts of the coast of Illyria, each believing the other drowned. To protect herself in this unknown land, Viola disguises herself as a young man, taking the name Cesario.
Viola's disguise proves all too effective, however, when she enters the service of the lovesick Duke Orsino, who makes "Cesario" his go-between in his persistent suit to the unresponsive Countess Olivia. Viola loyally fulfills this task, despite her own growing feelings for her employer - only to realize to her alarm that Olivia, while still disdaining the duke, has fallen in love with his seemingly male emissary.
The misunderstandings multiply with the arrival on the scene of Viola's twin brother, Sebastian: though the siblings do not yet meet, they are inevitably mistaken for each other, with consequences perplexing to them both.
Meanwhile, Olivia's reprobate uncle, Sir Toby Belch, holds nightly revels with Sir Andrew Aguecheek, another hopeless suitor for Olivia's hand. Rebuked by Malvolio, Olivia's stern and self-righteous steward, Sir Toby retaliates by joining with the maid Maria and the clown Feste in a practical joke: tricking Malvolio into thinking that Olivia is in love with him.
Acting on what he believes to be Olivia's instructions, Malvolio makes such a fool of himself that he is confined as a madman. Confusion reigns until Viola and Sebastian are reunited, Malvolio is freed and all is explained. Orsino asks Viola to be his wife, and Olivia, finding a substitute for Cesario in Sebastian, makes plans to host a lavish double wedding.