'Fanny Hill'
Fanny Hill, originally titled Memoirs of a Woman of Pleasure, by John Cleland, was written and published in London in 1748-49. It is generally regarded as Europe's first erotic novel and there seems little doubt that Casanova would have read it by the time he was in London in 1763. Although it might be regarded as tame today, the novel does confirm there is nothing new under the Sun. It was banned in the U.S. until 1966 and in Britain until 1970.
The book is a series of letters to an unknown woman by 15-year-old Fanny, who moves to London and she experiences a life of constant sex, seductions, orgies, homosexuality, giant penises and it all ends up happily ever after. As it should. The engraving below is from a 1766 edition.
That is not to say that Fanny Hill was the first pornographic work of "literature." That distinction is generally awarded to Aretino's sonnets and other "spin-offs" from his coterie like Puttana Errante (in English The Wandering Whore, possibly c.1650-60). In the 17th century, the age of the courtesan and the salon, the age of Ninon de Lenclos and Madame de Maintenon, the first major cluster of erotic literature was published for the public at large.
The most famous may well be L’Ecole des Filles (published in French around 1655). Like the others, it is a chatty dialogue (as opposed to a novel per se), this time between two teenage girls discussing their sex life. Prosecutions inevitably followed. It made it to England the same year, where Samuel Pepys picked up a copy and was most impressed (he claims he burnt the book after using it). Copies may have become rather hard to find after that and Casanova may not have encountered it at all till after his London trip - it was reprinted first in Holland in 1767-68. The English translation was The School of Venus, or the Ladies Delight - in 1680:
In France meanwhile: in 1683, Venus in the cloister, Or The nun in her smock. In curious dialogues, addressed to the Lady Abbess of Loves Paradice, by the Abbot Du Prat., but actually ascribed to Father Jean Barrin, was published in Paris and then London the same year. Its erotic content is in dialogues between two young nuns, Sister Agnès, aged 16, and Sister Angélique, aged 19, and cast as anti-clerical satire. It somehow remained available in France while England banned it till 2010.
Then, perhaps the most scandalous work was Histoire de Dom Bougre, portier des Chartreux (bougre = bugger). It first appeared in Paris in 1741 and was destroyed and reprinted many times across Europe... It told the tale of a porter at a Carthusian monastery – as you can see, monks and nuns were popular figures in 18th century erotic literature since to depict them this way was doubly scandalous.