The novel began not as a work for literary consumption, but as an elaborate practical joke aimed at luring the Marquis de Croismare, a companion of Diderot's, back to Paris. The novel consists of a series of letters purporting to be from a nun, Suzanne, who implores the Marquis to help her in renouncing her vows, and describes her intolerable life in the convent to which she has been committed against her will.
Diderot later revised the letters into a novel drawing attention both to the then-current practice of forcing young women into convents in order to get them out of the way, and the corruption that was supposedly rampant among the clergy and in religious institutions. When Diderot publicly admitted his role in the ruse, the Marquis is said to have laughed at the revelation, unsurprisingly since he had behaved with exemplary compassion and generosity in his willingness to help the imaginary Suzanne.
Abrams, Barbara Lise. (2009). Le Bizarre and Le Décousu in the Novels and Theoretical Works of Denis Diderot: How the Idea of Marginality Originated in Eighteenth-Century France. Lewiston, N.Y.: Edwin Mellen Press. ISBN 978-0-7734-4663-2