Mr. Algernon Moncrieff is a wealthy bachelor living in London’s fashionable West End. As the play begins, he prepares for a visit from his Aunt Agatha, Lady Bracknell, and her adorable young daughter Miss Gwendolyn Fairfax. His butler Lane has prepared cucumber sandwiches. Algy’s friend Mr. Ernest Worthing arrives, having been in the Shropshire countryside, announcing he has returned to propose marriage to Gwendolyn. Algy asks him to please not eat all the cucumber sandwiches, and says he will not give his consent to the match as Gwendolyn is, after all, his first cousin. He calls for his friend’s cigarette case, which was left behind after a previous visit; the case has a curious inscription: “From little Cecily with her fondest love to her dear Uncle Jack.” His friend has to admit that his name is really Jack, although he goes by Ernest in the country

Forced to elaborate, Jack reveals that his adopted father, old Mr. Thomas Cardew, made him guardian to the old man’s granddaughter, Miss Cecily Cardew, who lives in Shropshire with her governess, a Miss Prism. Jack has created an imaginary younger brother named Ernest who lives in the city and gets into “the most dreadful scrapes.” This has given him many excuses to get into town.

Algy is delighted that his friend is a Bunburyist and explains that he himself has an imaginary friend called Bunbury who is a permanent invalid and who has provided Algy with many excuses to go off to the country. In fact, Bunbury’s health will allow Algy to get out of a dinner engagement with Aunt Agatha that very night.

Lane shows in Gwendolyn, who is charmed to see Jack, and Lady Bracknell, who is not. She asks for cucumber sandwiches. Seeing there are none, she confronts Lane, who states there were no cucumbers to be had in the market, “not even for ready money.” When Algy announces he will be unable to dine with Lady Bracknell that evening, his aunt asks him to request Mr. Bunbury to make up his mind once and for all about his health. Left alone, Gwendolyn and Jack confess their love for each other and the young girl declares she has always wanted to love a man named Ernest. Jack decides to himself he must be christened at once, and proposes to a delighted Gwendolyn.

Lady Bracknell, however, has questions about the engagement and the proposed fiancée. She grills Jack about his habits, residence, income and politics. All seems to be in order until the question of Jack’s parentage is raised and the young man admits he does not know who his father is, having been found in a handbag in the cloakroom at Victoria Station by the generous old Mr. Cardew who raised him.

As the ladies depart, Jack berates the old Gorgon Lady Bracknell and the young men make plans before going out to dinner together. Gwendolyn returns to tell Jack that although they may never marry, he will always have her eternal devotion. She asks for his country address, which Algy slyly makes note of, before announcing he will be off to the country Bunburying the next day.

The second act discovers Cecily and her governess Miss Prism discussing lessons, men and the three volume novel, one of which Miss Prism confesses she herself penned in earlier days. Dr. Chausible, the local rector, enters and the older couple go off for a stroll. Merriman, the country butler, enters to announce the arrival of Mr. Ernest Worthing and Cecily is delighted to be about to meet her first “really wicked person.” When Algernon enters, they discuss “Ernest’s” foibles and plans, and Cecily invites him to dinner.

Miss Prism returns with Dr. Chausible, who she believes should marry so as not to remain a “permanent public temptation.” Jack returns unexpectedly, dressed in mourning attire, announcing the death of his poor brother. He arranges to be christened by the religiously enthused rector that afternoon at five. When Cecily tells him his brother is in the dining room, the rector is delighted at this unexpected return to health. Jack is not delighted. Algy professes his love to Cecily, who records his words in her diary as he asks her to marry him. Cecily reveals that – in her diary – they have been engaged for three months, and Cecily confesses she has always wanted to marry a man named Ernest. Algy rushes off to find the rector.

Merriman then announces the arrival of Miss Gwendolyn Fairfax. Gwendolyn is charmed by Cecily, but does not enjoy learning that she lives here in her fiancee’s home. When Cecily clarifies that it is not Mr. Ernest Worthing who is her guardian, but his brother Jack, Gwendolyn is relieved – until Cecily reveals that she is engaged to Mr. Ernest Worthing. The women compare notes, as tea is laid and somewhat strained conversation is made. When Jack enters, Gwendolyn asks if he is indeed engaged to Cecily, which Jack denies. Cecily identifies him as her Uncle Jack. When Algernon enters, Gwendolyn names him as Algernon Moncreiff. The men cannot deny these names and the ladies withdraw, embracing each other. The men discuss the unlikelihood of their impending marriages as they consume tea and muffins. To their dismay, they discover they are both due to be christened by the name of Ernest that afternoon; and tea continues.

The final act finds the women demanding explanations from the men. When the men reveal they are changing their names to Ernest, the women forgive them and fall into their arms, praising their courage. Lady Bracknell enters and hears of Algy’s intended engagement. When she learns of Cecily’s thirty thousand pounds, she decides the match may be suitable for her nephew. Jack, however, refuses to give his consent to his ward’s intended marriage. As Lady Bracknell does not approve of Jack, and Jack does not approve of Algy, it appears that neither marriage will go forward. The dejected men cancel their baptismal appointments. A grieved Dr. Chausible is about to return to Miss Prism, when the mention of the name piques Lady Bracknell’s interest.

Lady Bracknell demands Miss Prism be summoned at once. When the governess appears, an insistent question is put to her: “Prism! Where is that baby?” As the mystery of the missing baby is cleared up, facts are revealed that lead to what appears to be a happy ending, as we all realize “the vital Importance of Being Earnest.”