While researching the Marquis de Sade several years ago, I came across an intriguing biographical tidbit: that crazed French libertine, whose string of luridly violent works gave rise to the term “sadism,” actually began his literary career as a travel writer. In 1775, Sade embarked on a yearlong grand tour of Italy, and wrote an enormous (and enormously tedious) manuscript about the journey entitled “Voyage d’Italie.” The rambling opus, filled with ruminations on Florentine museums and Neapolitan customs, was never completed. Sade’s attention wandered to more carnal pleasures, and in 1777, he was arrested for a long list of unsavory imbroglios, including one that historians call the Little Girls Episode. Sade was thrown into the prison of Vincennes, and would spend most of his remaining life incarcerated. “Voyage d’Italie” soon joined a range of half-finished manuscripts from his youth, scraps of verse and staid dramatic pieces, none of which Sade ever had the discipline to bring to fruition.

From a strictly literary point of view, prison was the best thing that ever happened to the marquis. It was only behind bars that Sade was able to knuckle down and compose the imaginative works upon which his enduring, if peculiar, reputation lies.

Sade’s most impressive stint began after 1784, when he was transferred to the Bastille, which effectively operated as a literary colony on a par with Yaddo today. From a suite decorated with his own furniture and 600-book library (and tended by his valet), the marquis entered a mind-boggling frenzy of writing, cranking out thousands of manuscript pages at breakneck speed. As Francine du Plessix Gray describes in her classic biography “At Home With the Marquis de Sade,” he completed the first draft of his pornographic novel “Justine” in a single two-week-long burst, and knocked out the final 250,000-word draft of “The 120 Days of Sodom” in 37 days, transcribing minuscule letters on five-inch-wide pages glued into a roll nearly 50 feet long. By 1788, after only 11 years behind bars, Sade had churned out 8 novels and story collections, 16 historical novellas, 2 volumes of essays, a diary and some 20 plays. Whatever you make of Sade’s oeuvre, you have to envy his productivity.

Literary distraction seems a very modern problem. These days, distracted writers tend to blame the Internet, whose constant temptations shred our attention spans, fragment every minute and reduce us to a permanent state of anxiety, checking e-mail every 30 seconds — “like masturbating monkeys,” a writer friend once put it, a phrase of which Sade himself might have approved. But history is filled with writers who, like the marquis, could function only in extreme — and involuntary — isolation.