Viola survives a shipwreck and believes her brother was killed in it. Grieving, she decides to pretend to be a boy and find employment with Orsino, the Duke of Illyria. Cross-dressing as Cesario, she becomes Orsino's favorite page. She falls in love with him. On his orders she tries to woo Olivia for him. She is so persuasive that Olivia falls in love with her, leading to many complications. Viola accidentally discovers that her brother, Sebastian, did not drown, and they are reunited. When Orsino learns Cesario is really Viola, he realizes he has loved her all along and asks her to marry him.
Orsino, Duke of Illyria, suffers greatly from unrequited love. He has his heart set on winning Olivia, but she will not see him. He sends his new favorite servant, Cesario, to woo her for him. Orsino grows very fond of Cesario, but doesn't realize his servant is actually a woman, Viola. When Viola's true identity is revealed, Orsino understands he is in love with her, not Olivia.
Olivia has suffered through the deaths of her father and brother, and she has vowed to remain in mourning for seven years. In spite of that, she permits Orsino's new servant, Cesario (Viola), to plead Orsino's love to her. Cesario is compelling, and Olivia falls in love with Cesario, not realizing he is really a woman. Olivia pursues Cesario throughout the play. At one point she finds him—or so she thinks—and invites him into her house. He gladly accepts, but Olivia does not realize she has really found Viola's brother, Sebastian. She asks Sebastian to marry her, and he agrees. She doesn't discover her husband is actually Sebastian—not Cesario—until a few hours after the wedding.
Sebastian is heartbroken because he believes his sister drowned in the shipwreck. He is grateful to Antonio, who saved him and has become almost a surrogate father to him. Sebastian is perplexed when Olivia welcomes him so warmly (she believes him to be Cesario) but is impressed by her beauty and affection and happily agrees to marry her. He does not discover Viola is alive until after the wedding.