Algernon Moncrieff welcomes his friend Ernest Worthing in for a visit. Through an incident with a cigarette case and an unlucky inscription, Ernest is forced to confess that his name is really Jack. The story goes like this: in the country, Jack must lead the boring life of responsible guardian for his pretty, young ward Cecily. So he made up a seedy younger brother named Ernest, who is the urban socialite.
Cecily, we learn, is a bit too interested in Ernest for her own good. Whenever Jack feels like it, he visits London on the pretense that he’s cleaning up Ernest’s messes. After all, as the older brother he must be responsible for getting his younger brother out of trouble. Instead, Jack takes on the name Ernest and goes partying around town. Algernon is amused by this discovery and reveals that he has a similar nonexistent friend. Algernon's friend is a perpetual invalid named Bunbury, who allows Algernon to visit the country whenever he likes.
We learn that Jack is in love with Gwendolen Fairfax, who is Algernon’s cousin and coincidentally scheduled to visit that day. (Both Algernon and Gwendolen think that Jack’s name is Ernest.) Jack cuts a deal with Algernon; if Algernon can get Gwendolen’s mother, Lady Bracknell, out of the room, then Jack can propose to Gwendolen. In return, Jack will dine with Algernon tonight so that Algernon will avoid dining with his Aunt Augusta (a.k.a. Lady Bracknell).
The plan works. We learn that Gwendolen is smitten by the name, Ernest. She is just accepting Ernest’s proposal when Lady Bracknell re-enters the room, discovers them, and furiously sends Gwendolen down to the carriage. Lady Bracknell gives Ernest a chance to prove his worthiness by interviewing him. Once she decides that he is not fit for her daughter, she makes it clear that Gwendolen is not engaged to Ernest.
In a way, it is ironic that Lady Bracknell doesn't approve of the engagement to Ernest. Ernest is rich, has a good reputation around town, and seems to be perfectly suitable for Gwendolen. Except for one thing: he’s an orphan, abandoned at birth for unknown reasons, and found in a handbag at Victoria train station. This doesn’t fly with Lady Bracknell, who tells him to find his parents ASAP and then dismisses him. Furious, Jack and Algernon concoct a scheme for getting rid of Ernest. They decide that he’ll die in Paris of a severe chill.
In the meantime, Gwendolen has found an opportunity to slip back into the room and confess her undying love for Ernest. Having heard her mother’s furious remarks, she’s fascinated about his mysterious background and asks for his country address. As Ernest gives it, Algernon discreetly copies it down and later announces to his servant that he’s going Bunburying tomorrow.
At Jack’s country estate, young Cecily does everything she can to avoid studying her German grammar. She lies to get her governess, Miss Prism, to take a break. Miss Prism allows this only because she’s distracted by Dr. Chasuble, the local reverend. Just as Miss Prism leaves, the arrival of Ernest Worthing is announced. It turns out to be Algernon. Algernon and Cecily flirt outrageously. Cecily reveals that she's been fantasizing about Earnest for quite some time, and has even imagined that she's engaged to him. She invites him in for dinner.
At that moment, Miss Prism and Dr. Chasuble return from their walk, only to meet Jack dressed in black mourning clothes. He’s come home early to announce that his brother, Ernest, has died tragically in Paris, of a severe chill.
Right on cue, Cecily comes out to tell her Uncle Jack that Ernest has come to visit. When Jack sees it’s Algernon, he is furious and arranges for Ernest to leave via the dog-cart. When the cart comes, Algernon promptly sends it away. Cecily pays Algernon a visit and they engage in more flirtation, where we learn that Cecily is obsessed with the name, "Ernest."
When Algernon leaves (to arrange a baptism), Gwendolen arrives. Cecily entertains her. When each lady learns that the other is supposedly engaged to Ernest Worthing, they immediately start fighting. Luckily, both Jack and Algernon show up in time to clear up any doubt. Their true identities are revealed, as well as the fact that there is no Ernest. The women, realizing they’ve been tricked, suddenly become as close as sisters and go up to the house arm-in-arm, turning their backs on the men. Meanwhile, the men take out their frustration on the remaining tea items, fighting over the muffins, while they figure out what to do.
Eventually, they enter the house, and confess to the women. The Ernest business, they say, was done only so that they could see their beloved ladies as often as possible. The women forgive them. But their joy is interrupted by the arrival of Lady Bracknell. She has come to bring Gwendolen home. When she sees Cecily holding Algernon’s hand, she gives her an icy glare, but politely asks Jack how big this girl’s inheritance is. When she finds out that the girl is extremely wealthy, Lady Bracknell’s attitude toward Cecily changes and she gives consent for her and Algernon to marry. But Jack, as Cecily’s guardian, refuses to give his consent unless Lady Bracknell allows him to marry Gwendolen. Lady Bracknell wants nothing to do with it.
Dr. Chasuble shows up to tell Jack and Algernon that everything is ready for their baptisms and happens to mention Miss Prism. Lady Bracknell’s ears prick up at the name. Miss Prism is brought before her and shamefacedly confesses the truth: she was once Lady Bracknell’s servant and was in charge of a certain child. One day, she took the baby out in his stroller for a walk and brought along some leisure reading– a three-volume novel that she had written – and kept in a handbag. Distracted, she switched the two – putting the novel in the stroller and the baby into the hand bag. She dropped the handbag off at Victoria train station.
At this discovery, Jack freaks out and runs upstairs to find something. When he comes back down, he’s holding the handbag (remember, Jack is an orphan who was found in a handbag). Jack mistakenly thinks Miss Prism is his mother, but is corrected by Lady Bracknell, who tells him that a Mrs. Moncrieff is his mother. That makes Jack Algernon’s older brother.
Then, they all wonder what Jack's real name is. Remember, Gwendolen will only love him if his name is Ernest. Lady Bracknell tells Jack he was named after his father, but nobody can remember what the General’s name was. Jack looks up "Moncrieff" in his book of Army Lists. The results? His father’s name was Ernest. So he’s been telling the truth all along. His name really is Ernest. And now he can marry Gwendolen. There’s general rejoicing. Gwendolen hugs Ernest. Cecily hugs Algernon. Miss Prism hugs Dr. Chasuble. And Ernest closes the play by insisting that he’s now learned the "importance of being earnest."