Jack and Algernon are wealthy gentlemen. Jack (known to Algernon as Ernest) lives a respectable life in the country providing an example to his young ward Cecily. Algernon lives in luxury in London and has invented an imaginary invalid friend (Bunbury) whom he visits in the country whenever an unappealing social engagement presents itself. Jack has also invented a character – a wayward younger brother called Ernest whom he uses as pretext for going up to London and enjoying himself.
Jack wants to marry Algernon’s cousin Gwendolen, but must first convince her mother, Lady Bracknell, of the respectability of his parents. For Jack, having been abandoned in a handbag at Victoria station, this is quite a difficult task.
Algernon visits Jack’s house in the country and introduces himself to Cecily as Ernest, knowing that Cecily is already fascinated by tales of Ernest’s wickedness. He further wins her over and they become engaged. Shortly after, Jack arrives home announcing Ernest’s death. This sets off a series of farcical events. Cecily and Gwendolen have a genteel stand-off over which of them has a prior claim on ‘Ernest’. Jack and Algernon vie to be christened Ernest. Eventually, Jack discovers that his parents were Lady Bracknell’s sister and brother-in-law and that he is, in fact, Algernon’s older brother, called Ernest. The two sets of lovers are thus free to marry.
During these events the characters of Canon Chasuble and Cecily’s governess Miss Prism have also fallen in love, and in the best tradition of the well-made play the story ends with all the loose ends tied up and everyone set to live happily ever after.