Oscar Wilde, celebrated playwright and literary provocateur, was born in Dublin on October 16, 1854. He was educated at Trinity College, Dublin and Magdalen College, Oxford before settling in London. During his days at Dublin and Oxford, he developed a set of attitudes and postures for which he would eventually become famous. Chief among these were his flamboyant style of dress, his contempt for conventional values, and his belief in aestheticism—a movement that embraced the principle of art for the sake of beauty and beauty alone. After a stunning performance in college, Wilde settled in London in 1878, where he moved in circles that included Lillie Langtry, the novelists Henry James and George Moore, and the young William Butler Yeats.

Literary and artistic acclaim were slow in coming to Wilde. In 1884, when he married Constance Lloyd, Wilde’s writing career was still a work in progress. He had gone on a lecture tour of North America and been lampooned in the 1881 Gilbert and Sullivan operetta Patience as the self-consciously idiosyncratic philosopher-poet Reginald Bunthorne, but he was celebrated chiefly as a well-known personality and a wit. He may have been the first person ever to become famous for being famous.

During the late 1880s, Wilde wrote reviews, edited a women’s magazine, and published a volume of poetry and one of children’s stories. In 1891, his only novel, The Picture of Dorian Gray, appeared and was attacked as scandalous and immoral. In that same year, he met Lord Alfred Douglas, who would eventually become his lover, and Wilde finally hit his literary stride. Over the next few years, he wrote four plays: Lady Windermere’s Fan, A Woman of No Importance, An Ideal Husband, and The Importance of Being Earnest.

Lady Windermere’s Fan and A Woman of No Importance enjoyed successful runs in the West End in 1892 and 1893, respectively. An Ideal Husband opened in January 1895, but it was The Importance of Being Earnest, which opened a month later, that is regarded by many as Oscar Wilde’s masterpiece. Its first performance at the St. James’s Theater on February 14, 1895 came at the height of Wilde’s success as a popular dramatist. Wilde was finally the darling of London society, a position he had striven for years to attain.

In many ways, The Importance of Being Earnest was an artistic breakthrough for Wilde, something between self-parody and a deceptively flippant commentary on the dramatic genre in which Wilde had already had so much success. Wilde’s genre of choice was the Victorian melodrama, or “sentimental comedy,” derived from the French variety of “well-made play” popularized by Scribe and Sardou. In such plays, fallen women and abandoned children of uncertain parentage figure prominently, letters cross and recross the stage, and dark secrets from the past rise to threaten the happiness of seemingly respectable, well-meaning characters. In Wilde’s hands, the form of Victorian melodrama became something else entirely. Wilde introduced a new character to the genre, the figure of the “dandy” (a man who pays excessive attention to his appearance). This figure added a moral texture the form had never before possessed. The character of the dandy was heavily autobiographical and often a stand-in for Wilde himself, a witty, overdressed, self-styled philosopher who speaks in epigrams and paradoxes, ridicules the cant and hypocrisy of society’s moral arbiters, and self-deprecatingly presents himself as trivial, shallow, and ineffectual. In fact, the dandy in these plays always proves to be deeply moral and essential to the happy resolution of the plot.

The Importance of Being Earnest was an early experiment in Victorian melodrama. Part satire, part comedy of manners, and part intellectual farce, this play seems to have nothing at stake because the world it presents is so blatantly and ostentatiously artificial. Below the surface of the light, brittle comedy, however, is a serious subtext that takes aim at self-righteous moralism and hypocrisy, the very aspects of Victorian society that would, in part, bring about Wilde’s downfall.

During 1895, however, a series of catastrophes stemming from Wilde’s relationship with Lord Alfred, also a poet, led to personal humiliation and social, professional, and financial ruin. On February 28, 1895, two weeks after The Importance of Being Earnest’s opening night, Lord Alfred’s belligerent, homophobic father, the Marquess of Queensberry, publicly accused Wilde of “posing as a somdomite.” The nobleman meant “sodomite,” of course, an insulting and potentially defamatory term for a homosexual. Queensberry had for some time been harassing Wilde with insulting letters, notes, and confrontations and had hoped to disrupt the opening night of The Importance of Being Earnest with a public demonstration, which never took place. Against the advice of his friends, Wilde sued for libel and lost. Wilde probably should have fled the country, as the Criminal Law Amendment Act of 1885 had made homosexual acts punishable by up to two years’ imprisonment. However, Wilde chose to stay and was arrested. Despite information about Wilde’s private life and writings that emerged at the trial, the prosecution initially proved unsuccessful. However, Wilde was tried a second time, convicted, and sentenced to prison for two years.

Wilde may have remained in England for a number of reasons, including self-destructiveness, denial, desperation, and a desire for martyrdom. However, some historians have suggested that Wilde’s relentless persecution by the government was a diversionary tactic. Lord Alfred’s older brother was reportedly also having a homosexual affair with Archibald Philip Primrose, Lord Rosebery, the man who would become prime minister. Queensberry was apparently so outraged that he threatened to disclose the relationship, and the government reacted by punishing Wilde and his lover in an effort to assuage the marquess. In any case, Wilde served his full sentence under conditions of utmost hardship and cruelty. Following his release from prison, his health and spirit broken, he sought exile in France, where he lived out the last two years of his life in poverty and obscurity under an assumed name. He died in Paris in 1900.

For sixty or seventy years after Wilde’s death, critics and audiences regarded The Importance of Being Earnest as a delightful but utterly frivolous and superficial comedy, a view that partly reflects the mindset of a period in which homosexuality remained a guarded topic. The decriminalization of homosexuality in England in 1967 and the emergence in American of an interest in gay culture, and particularly in the covert homosexual literature of the past, has made it possible to view the play in a different light. The play’s danger and subversion are easier to see from a twenty-first-century perspective. In the ambiguity over exactly what people refer to when they speak of “wicked” or immoral behavior, we can detect a system of coded references to homosexuality, just as we can infer a more general comment on the hypocrisy of late Victorian society.