Oscar Wilde was many things. He tried on identities almost like costumes – by turns a celebrity playwright and poet, an expatriate Irishman adrift in England. Wilde was a gay man in the UK during a period when it was both illegal and dangerous to be so. His relationship with another man ended in a humiliating court case and prison sentence that ruined him physically, emotionally and financially. Broken by the experience, he died the age of just 46.

Despite being one of the most brilliant comic writers in the history of world theatre, throughout his life Wilde battled to be taken seriously as an artist, a battle which he feared he had never truly won. ‘I put all my genius into my life, I put only my talent into my books’, he once remarked.

Oscar Fingal O’Flahertie Wills Wilde was born in Dublin on 16 October 1854. His father was one of Ireland’s leading medical surgeons, and his mother was a poet and expert on Irish folklore. In 1871 the teenage Oscar won a scholarship to Trinity College, Dublin, one of Ireland’s most prestigious universities. A few years earlier, the family had been shocked by the death of his young sister Isola; Oscar was especially grief-stricken. Isola became the subject of one of his earliest published works, the 1881 poem ‘Requiescat’ (the Latin title for a prayer for the dead). Wilde carried a lock of her hair around with him for the rest of his life. Wilde excelled academically, and in 1874 won a scholarship to Oxford University to study Classics. He graduated with a double first-class degree. After he graduated, he moved to London to pursue a literary career.

Wilde soon became a fixture of the London arts and social scene, famous for being famous. His reputation was enhanced by his wit and flamboyant dress sense (he was known for his colourful bow ties and extravagant hats).

Despite his early successes, Wilde yearned to become a serious artist – most especially a playwright. His first play, a tragedy called Vera (1881), failed when it was produced in New York. His second, a historical work in Shakespearian verse called The Duchess of Padua, was rejected by the actress who commissioned it. His personal life seems to have been happier. In 1884, he married Constance Lloyd, the daughter of a well-known Irish barrister; together, the couple had two boys. It looked like an ideal family, at least to observers.

Success of a more scandalous kind followed the publication of Wilde’s novel, The Picture of Dorian Gray, which first appeared in a magazine before being printed in book form in 1891. Dorian Gray tells the fantastical story of a beautiful young man who buys eternal youth and pays for it with his soul. Desperate not to lose his youthful beauty, Dorian makes a wish that a painted portrait of him will grow old, while he himself stays young – he finds that this is exactly what happens. Dorian Gray shocked many readers. The critics rounded on Wilde, accusing him of immorality and describing the novel as ‘effeminate’ and ‘unmanly’.

In summer 1891 he began work on the script that became known as Lady Windermere’s Fan, the drama was a hit on the London West End the following year. The plays that followed made Wilde one of the most renowned playwrights of the age. A Woman of No Importance (1893) focuses on a woman who was abandoned by her high-society lover when she became pregnant, satirising class and sexual double standards in Victorian England. An Ideal Husband (1895) questions what ‘ideal’ in marriage really means.

Wilde showed that he could master tragedy, too, as demonstrated in his melodrama Salomé. Originally written in French, the play relates the Bible story of a dancer who falls in love with John the Baptist, only to be rejected by him. Infuriated, Salomé demands that John be executed and his head brought to her on a silver platter (as Wilde would later write: ‘each man kills the thing he loves’). Yet again, Salomé caused controversy: the play was banned by the British authorities, supposedly because it depicted Biblical characters, and it was not finally staged until 1896.

In February 1895, less than a month after the debut of An Ideal Husband, The Importance of Being Earnest, the play many now regard as his masterwork, opened in London

Creatively, the early 1890s were a remarkable period for Wilde, but clouds were gathering. His marriage was under pressure, and in 1891 he met and began a sexual relationship with Lord Alfred Douglas, a young and startingly good-looking aristocrat and via him was introduced to London’s gay scene – very much an underground world, because relationships between men were illegal in Victorian England.

In April 1895, Wilde sued Alfred’s father, the Marquis of Queensberry, for libel, after the Marquis has accused him of being homosexual. Wilde lost and, after details of his private life were revealed during the trial, was arrested and tried for gross indecency. He was sentenced to two years of hard labour. While in prison he composed a long letter to Douglas, posthumously published under the title ‘De Profundis’.  Wilde found the experience crushing, particularly when he was sent to Reading jail, west of London, where conditions were poor and he was physically attacked by other inmates. He struggled to adapt, and was declared bankrupt, meaning that Constance and the children – she refused to divorce her husband – lost their house and nearly all their possessions. Wilde was eventually released in 1897.

Although Wilde left for France as soon as he was released, his health and creative spirit were broken. He spent his final few years shuttling around Europe. In November 1900, Wilde was suddenly taken ill and died in a cheap Parisian hotel. He is buried in the famous Père Lachaise cemetery in the city.