Even before Wilde sent the manuscript of “The Picture of Dorian Gray” to the typist, he was hesitating over its homoerotic content. Illustration by Edward Sorel

Oscar Wilde was not a man who lived in fear, but early reviews of “The Picture of Dorian Gray” must have given him pause. The story, telling of a man who never ages while his portrait turns decrepit, appeared in the July, 1890, issue of Lippincott’s, a Philadelphia magazine with English distribution. The Daily Chronicle of London called the tale “unclean,” “poisonous,” and “heavy with the mephitic odours of moral and spiritual putrefaction.” The St. James Gazette deemed it “nasty” and “nauseous,” and suggested that the Treasury or the Vigilance Society might wish to prosecute the author. Most ominous was a short notice in the Scots Observer stating that although “Dorian Gray” was a work of literary quality, it dealt in “matters only fitted for the Criminal Investigation Department or a hearing in camera” and would be of interest mainly to “outlawed noblemen and perverted telegraph-boys”—an allusion to the recent Cleveland Street scandal, which had exposed the workings of a male brothel in London. Within five years, Wilde found himself convicted of “committing acts of gross indecency with certain male persons.”

The furor was unsurprising: no work of mainstream English-language fiction had come so close to spelling out homosexual desire. The opening pages leave little doubt that Basil Hallward, the painter of Dorian’s portrait, is in love with his subject. Once Dorian discovers his godlike powers, he carries out various heinous acts, including murder; but to the Victorian sensibility his most unspeakable deed would have been his corruption of a series of young men. (Basil tells Dorian, “There was that wretched boy in the Guards who committed suicide. You were his great friend. There was Sir Henry Ashton, who had to leave England, with a tarnished name. You and he were inseparable.”) At the Wilde trials of 1895, the opposing attorneys read aloud from “Dorian Gray,” calling it a “sodomitical book.” Wilde went to prison not because he loved young men but because he flaunted that love, and “Dorian Gray” became the chief exhibit of his shamelessness.

Wilde died in 1900, in a run-down Paris hotel, at the age of forty-six. Almost overnight, a legend was born: Wilde the homosexual martyr, Wilde the moral rebel. A nascent gay-rights movement embraced him as a hero of defiance. When, in 1967, Craig Rodwell opened a gay-and-lesbian bookstore in New York, he named it the Oscar Wilde Memorial Bookshop, and after the Stonewall riots of 1969 Rodwell used the bookstore’s mailing list to help organize the first gay-pride parade. As recently as the late eighties, you could still find bookish young people coming to terms with their sexuality by way of reading Wilde. (You could at least find me.) Whether or not Wilde saw himself as part of a cause, he did not lack courage. The multiple versions of “Dorian Gray”—the earliest surviving manuscript, which is at the Morgan Library; the typescript sent to Lippincott’s, which Harvard University Press has just made available in an “uncensored” edition; the published Lippincott’s text; and the expanded book publication of 1891—show Wilde deciding, sentence by sentence, just how far he would go.

The Wilde Bookshop closed in 2009, a casualty not only of the decline of the bookselling business but also of the partial triumph of Rodwell’s mission. In many major cities, at least, gays and lesbians no longer seem to need a safe place in the form of a store. And they no longer seem to need the tragicomic Oscar; the young gays of today can revel in the wit and wisdom of Neil Patrick Harris. All of which leaves Wilde in an interesting limbo. What will he mean in a perhaps not too distant time when homosexuality has ceased to be a conversation stopper?

“To the world I seem, by intention on my part, a dilettante and dandy merely—it is not wise to show one’s heart to the world,” Wilde once wrote. We should not assume that his heart was revealed to us when he became a gay icon, or when he was canonized in wider bohemian circles as the patron saint of “Be yourself.” (The phrase appears in the 1891 essay “The Soul of Man Under Socialism.”) Wilde’s aestheticism, his fanatical cult of beauty, was the deepest and most lasting of his passions, and it is now the most radical thing about him. Perhaps only the threat of persecution prevented Wilde from freely expressing his sexuality in his writing; yet he also may have been caught in the modern struggle to inhabit an identity without becoming defined by it. The ghastly ending of “Dorian Gray”—Dorian stabbing his portrait in a frenzy—shows a man losing a battle with his public image.

The two most recent major biographies of Wilde are Thomas Wright’s “Built of Books: How Reading Defined the Life of Oscar Wilde,” which appeared in 2008, and Neil McKenna’s “The Secret Life of Oscar Wilde: An Intimate Biography,” which came out in 2005. They present almost comically contradictory portraits. Wright’s Wilde is an intellectual dreamer who rarely steps outside the literary realm. We are told that his parents—the eye-and-ear surgeon William Wilde and the poet Jane Francesca Wilde, who wrote under the name Speranza—accumulated mountains of books at their home, in Dublin, and that young Oscar habitually read in bed, his mind ravished by Irish folktales, ancient-Greek texts, Romantic poems, and gothic novels. Wright even suggests that Wilde discovered his sexuality in the pages of Plato. “Was it a case of literary nurture over biological nature?” Wright asks, as if Wilde might have found boys unattractive had the philosopher not put the idea in his head. In this telling, Wilde’s ultimate humiliation came not on the day of his arrest, on April 5, 1895, but a few weeks later, when his library was auctioned off.

McKenna’s Wilde, by contrast, is a largely sexual being who reads in order to find a language for his desire and writes in order to speak that desire aloud. He is hailed as “a martyr in an epic struggle for the freedom of men to love men.” McKenna rejects the idea, set forth in previous biographies, that Wilde had no gay life until his early thirties, when he met Robert Ross, a precociously self-aware Canadian teen-ager, in Oxford. In fact, certain of Wilde’s youthful poems drip with homoeroticism—“And he looked on me with desire / And I know that his name was Love”—and his early friendship with the painter Frank Miles, among others, had a sexual tinge. Yet McKenna reads too much into meagre evidence. He is a writer of the “almost certainly” school, and he withholds material that belies his thesis. (He does not mention that Miles was notoriously attracted to very young girls.) Later chapters rely on the dubious memoirs of Edmund Trelawny Backhouse, a forger and a fantasist, who claimed carnal knowledge not only of the principals in the Wilde case but also of Paul Verlaine and the Dowager Empress of China. McKenna, by fixating on Wilde’s sexual life, arrives at an oddly unflattering portrait. Preying on young literary fans, paying off rent boys, picking up lads as young as fifteen—Wilde is stripped of his charm.