Oscar Wilde was born in Dublin. His father was Sir William Wilde; his mother Lady Jane Francesca Wilde. From the age of 9 to 16 he went to Portora Royal School in Enniskillen, which Samuel Beckett later attended. He went on to Trinity College, Dublin (1871-74), and to Magdalen College, Oxford (1874-78), where he was dandified, sexually ambiguous, sympathetic towards the Pre-Raphaelites, and contemptuous of conventional morality. He was also an accomplished Classicist, and won the Newdigate prize at Oxford in 1878 for the poem Ravenna, which his biographer, Richard Ellmann, described as 'a clever hodgepodge of personal reminiscence, topographical description, political and literary history'.
Wilde's first collection of poetry was published in 1881, the year in which he was ridiculed in Gilbert and Sullivan's Patience as an adherent of the cult of 'Art for Art's sake'. The next year he embarked on a lecture tour of the USA where, when asked if he had anything to declare he allegedly replied, 'Only my genius'. The tour, wrote Ellmann, 'was an advertisement of courage and grace, along with ineptitude and self-advertisement', and Wilde boasted to James McNeill Whistler, 'I have already civilized America'.
He married Constance Lloyd, the daughter of an Irish barrister, in 1884 and had two sons for whom he wrote the classic children's fairy stories The Happy Prince and Other Tales (1888). His only novel, The Picture of Dorian Gray (1891), was modelled on his presumed lover, the poet John Gray, and was originally published to a scandalized reception in Lippincott's Magazine (1890). More fairy stories appeared in 1891 in A House of Pomegranates. In this year he also published Lord Arthur Savile's Crime and Other Stories, and a second play, The Duchess of Padua, an uninspired verse tragedy.
Over the next five years he built his dramatic reputation, first with Lady Windermere's Fan (1892), followed by A Woman of No Importance (1893), An Ideal Husband (1895) and his masterpiece, The Importance of Being Earnest (1895). Salomé, originally written in French (1893), was refused a production licence in England as it featured biblical characters, but appeared in 1894 in an English translation by Lord Alfred Douglas.
By now Wilde's homosexuality was commonly known, and the 8th Marquis of Queensberry, father of Lord Alfred, left a card at Wilde's club addressed 'To Oscar Wilde posing as a Somdomite' (sic). Wilde took it that he meant 'ponce and Sodomite' and sued for libel. He lost the case, and was himself prosecuted and imprisoned (1895) for homosexuality. In 1905 his bitter reproach to Lord Alfred was published in part as De Profundis. Released in 1897, he went to France under the alias Sebastian Melmoth, the name of his favourite martyr linked with the hero of Melmoth the Wanderer, the novel written by his great-uncle, Charles Maturin.
The Ballad of Reading Gaol was published in 1898. He also wrote literary essays, and The Soul of Man Under Socialism (1891), a riposte to George Bernard Shaw. His last years were spent wandering and idling on the Continent, and he died in Paris.