written in exile either in Berneval or in Dieppe, France, after his release from Reading Gaol on or about 19 May 1897. Wilde had been incarcerated in Reading, after being convicted of homosexual offences in 1895 and sentenced to two years' hard labour in prison.
During his imprisonment, on Saturday 7 July 1896, a hanging took place. Charles Thomas Wooldridge (ca. 1866 – 7 July 1896) had been a trooper in the Royal Horse Guards. He was convicted of cutting the throat of his wife, Laura Ellen, earlier that year at Clewer, near Windsor. He was only aged 30 when executed. This had a profound effect on Wilde, inspiring the line "Yet each man kills the thing he loves."
The finished poem was published by Leonard Smithers in 1898 under the name C.3.3., which stood for cell block C, landing 3, cell 3. This ensured that Wilde's name – by then notorious – did not appear on the poem's front cover. It was not commonly known, until the 7th printing in June 1899, that C.3.3. was actually Wilde.