Set in England during the late Victorian era, the play's humour derives in part from characters maintaining fictitious identities to escape unwelcome social obligations. It is replete with witty dialogue and satirizes some of the foibles and hypocrisy of late Victorian society. It has proved Wilde's most enduringly popular play.
The successful opening night marked the climax of Wilde's career but also heralded his impending downfall. The Marquess of Queensberry, father of Wilde's male lover Lord Alfred Douglas, attempted to enter the theatre, intending to throw vegetables at the playwright when he took his bow at the end of the show. Wilde was tipped off and Queensberry was refused admission. Nonetheless, Queensberry's hostility to Wilde was soon to trigger the latter's legal travails and eventual imprisonment. Wilde's notoriety caused the play, despite its success, to be closed after only 83 performances. He never wrote another play.
Algernon's real-life best friend lives in the country but makes frequent visits to London. Algernon knows him as Ernest Worthing, but when he left his silver cigarette case in Algernon's flat, Algernon found an inscription in it: "From little Cecily, with her fondest love to her dear Uncle Jack."
"Ernest" is thus forced to disclose that he too is leading a double life, though he rejects the term "Bunburyist". In the country, he goes by the name of John ("Jack" for short), and pretends that he has a wastrel brother named Ernest, who lives in London and requires his frequent attention. In the country Jack assumes a more serious attitude for the benefit of his young ward, Cecily, an 18-year old heiress and granddaughter of Jack's late adoptive father. When in the city, he assumes the name and behaviour of the profligate Ernest.
Jack wants to marry Algernon's cousin Gwendolen, but faces two obstacles. First, Gwendolen seems to love him largely for his name, Ernest, which she thinks the most beautiful name in the world. Second is Gwendolen's terrifying mother, Lady Bracknell. Lady Bracknell insists on thoroughly questioning Mr. Worthing before giving her consent to marrying her daughter. His financial position, politics, and London address are acceptable, but she is horrified to learn that he was adopted as a baby after being discovered in a handbag at a railway station. It is absolutely unthinkable for her daughter to "marry into a cloakroom and form an alliance with a parcel."
Meanwhile, Jack's description of Cecily ("excessively pretty", healthy appetite, disregard for education) has so appealed to Algernon that he resolves to meet her, in spite of Jack's objections. Algernon goes to Jack's country house, where he announces himself as "Ernest". Cecily has for some time imagined herself in love with the mysterious scapegrace Ernest, and has even fantasized that she is engaged to him. She is soon swept off her feet by Algernon, who is pleased to learn of "his" engagement.
Jack, meanwhile, has decided to put his life as Ernest behind him. He arrives at his country house with the news that his brother Ernest has died in Paris of a "severe chill". He is forced to abandon this claim by the presence of Algernon in the role of "Ernest", who threatens to expose Jack's double life if the latter doesn't play along.
Cecily loves her "Ernest" at least in part for his name, and thus Algernon and Jack both ask the local rector, Reverend Chasuble, to baptise them as "Ernest".
Gwendolen, in turn, flees London and her mother to be with her love. When she and Cecily meet for the first time, each insists that she is the one engaged to "Ernest". This results in verbal conflict until Jack and Algernon appear and their deceptions are exposed. The girls drop their quarrel and indignantly reject the men. Then the men announce the planned baptisms, so the girls forgive them and the couples reconcile.
Lady Bracknell now arrives in pursuit of her daughter. She meets Cecily, but doubts her suitability as a wife for Algernon until the amount of her trust fund is revealed. However a stalemate transpires when Jack denies his consent to the marriage of his wealthy ward Cecily to the penniless Algernon until Lady Bracknell consents to his marriage to Gwendolen.
The impasse is broken, in deus ex machina fashion, by the appearance of Cecily's governess, Miss Prism. Lady Bracknell recognizes her name, and interrogates the hapless woman. It is revealed that twenty-eight years previously, she was employed in the Bracknell household. One day she went out with a baby boy in a perambulator and never returned. "Where is that baby?" Lady Bracknell demands. Miss Prism explains that, in a moment of distraction, she put the manuscript of a novel she had been writing in the perambulator, and put the baby in a handbag, which she left at Victoria Station. When she realised her mistake, Miss Prism fled. Jack produces the handbag he was found in, and Miss Prism identifies it, showing that Jack is the long-missing child. He is the elder son of Lady Bracknell's late sister and thus -- Algernon's older brother!
With Jack's provenance established, only one thing now stands in the way of the young couples' happiness. In view of Gwendolen's continued insistence that she can only love a man named Ernest, what is Jack's real first name? Lady Bracknell informs him that he was named after his father, a general, but cannot remember the general's first name. Jack looks in the Army Lists and finds that the name is in fact Ernest. He begs Gwendolen's forgiveness for the fact that he has been telling the truth all along.
As the happy couples embrace, including also Miss Prism and her clerical admirer, Reverend Chasuble, Lady Bracknell complains to her new-found relative: "My nephew, you seem to be displaying signs of triviality." "On the contrary, Aunt Augusta," he replies, "I've now realised for the first time in my life the vital Importance of Being Earnest."
When Wilde handed his final draft of the play over to theatrical impresario George Alexander it was complete in four acts. The actor manager of the St. James' Theatre soon began a reworking of the play (whether to provide space for a 'warmer' or for a musical interlude, as was often the bill, is not entirely clear). Wilde agreed to the cuts and various elements of the second and third acts were combined. The ensuing three act play is the version that opened in London and also the version usually performed and published ever since.
The "missing" extra act, coming between the current second and third, was heavily cut. The greatest impact was the loss of the character Mr. Gribsby, a solicitor who turns up from London to arrest the profligate "Ernest" (i.e. Jack) for his unpaid dining bills. Algernon — who is going by the name "Ernest" at this point — is about to be led away to Holloway Jail unless he settles his accounts immediately. Jack finally agress to pay for Ernest — everyone thinking that it is Algy's bill when in fact it is his own.
The four-act version was first played on the radio in a BBC production and is still sometimes performed. The 2002 film includes the Gribsby scene from the missing act.
In some languages, the title loses its character as a pun. In Norwegian it is staged as Hvem er Ernest?, which means "Who is Ernest?" In Spanish-speaking countries, the title is translated as La importancia de llamarse Ernesto (The Importance of Calling Yourself Ernest).
Several languages—German, Dutch, French, Hungarian, Czech and Slovak—offer equivalent puns. In Germany the play and the 2002 movie are called Ernst sein ist alles ("Being Earnest is everything"), keeping the original pun (Ernst being both a first name and a German word for serious). In Dutch it has been translated as Het belang van Ernst, in which the pun is also fully functional. In French, the play is known as De l'importance d'être Constant, Constant being both a mildly uncommon first name and the quality of steadfastness; the pun is preserved but with a slightly different meaning.
The Italian L'importanza di essere Ernesto, or L'importanza di essere Franco ("The Importance of Being Frank"), similarly preserves punning with a slight twist. In Catalan it is also, as in Italian, "La importància de ser Franc" ("The Importance of Being Frank"). The same approach has been used in Hungarian: the title has been translated as Szilárdnak kell lenni ("One Must Be Steadfast"), Szilárd being also an uncommon first name meaning "steadfast". In Czech, the title is translated as Jak je důležité míti Filipa ("The Importance of Having Phillip"), which is an idiom for being clever, and Filip is a quite common name. Similarly, in Basque it has been titled Fidel izan beharraz ("On the need to be Fidel"), fidel being both the Basque word for "faithful" and a first name. Likewise, in Esperanto, the play is called La Graveco de la Fideliĝo (the importance of becoming faithful/becoming Fidel).
In Polish, however, the title is Brat Marnotrawny ("The Prodigal Brother"), an allusion to the parable of the Prodigal Son (in Polish: Syn Marnotrawny). In Hebrew it is known as Hashivuta shel retsinut ("The Importance of Seriousness").
Some have implied that Wilde's use of the name Ernest might possibly be an inside joke. John Gambril Nicholson in his poem "Of Boy's Names" (Love in Earnest: Sonnets, Ballades, and Lyrics (1892)) contains the lines: " Though Frank may ring like silver bell, And Cecil softer music claim, They cannot work the miracle, –'Tis Ernest sets my heart a-flame." The poem was promoted by John Addington Symonds and Nicholson and Wilde contributed pieces to the same issue of The Chameleon magazine. Theo Aronson has suggested that the word "earnest" became a code-word for homosexual, as in: "Is he earnest?", in the same way that "Is he so?" and "Is he musical?" were also employed.
The words bunbury and bunburying, meanwhile, which are used to imply double lives and as excuses for absences, are -- according to a letter from Aleister Crowley to Sir R. H. Bruce Lockhart -- an inside joke that came about after Wilde boarded a train at Banbury on which he met a schoolboy. They got into conversation and subsequently arranged to meet again at Sunbury.
Contrary to claims of homosexual terminology, the actor Sir Donald Sinden, who in the 1940s had met two of the play's original participants (Irene Vanbrugh, the first Gwendolen, and Allan Aynesworth, the first Algy), as well as Wilde's lover Lord Alfred Douglas, wrote to The Times to dispute suggestions that 'Earnest' held any sexual connotations: "Although they had ample opportunity, at no time did any of them even hint that Earnest was a synonym for homosexual, or that Bunburying may have implied homosexual sex. The first time I heard it mentioned was in the 1980s and I immediately consulted Sir John Gielgud whose own performance of Jack Worthing in the same play was legendary and whose knowledge of theatrical lore was encyclopaedic. He replied in his ringing tones: "No-No! Nonsense, absolute nonsense: I would have known. The latter remark gains additional salience from the fact that Gielgud himself was well-known in theatrical circles to be gay.