This article accompanies the fable
Fanny Hill aka Memoirs of a Woman of Pleasure, by John Cleland, written and published in London in 1748-49, 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 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 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.
In France meanwhile, 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 -- monks and nuns were popular figures in 18th century erotic literature since to depict them this way was doubly scandalous.