Fabio Sabatin/Getty

Tens of thousands of dragooned serfs perished while draining the swamps to lay the foundations of St. Petersburg, and residents like to remind visitors that their city, enchanting though it may be, “rests on bones.” Its charnel mansion has fed the imagination of some of Russia’s greatest writers, most notably Fyodor Dostoyevsky, whose works are lodged deep in mine: Crime and Punishment and Notes From Underground are two masterpieces of the many in Russian literature that inspired me to become a writer. I recently traveled to St. Petersburg to reconnect with him and his environs, hoping to rediscover something of the passion that drove me to move to Moscow 21 years ago—a passion dimmed by the return of the authoritarian state, with its soul-numbing gloom. An unlikely mission, I know, to seek uplift from the high priest of alienation.

I began my tour at the last of Dostoyevsky’s many apartments: in his 28 years in the city, the Moscow-born writer moved some 20 times, ending up in Kuznechny Lane 5/2, a stately fin-de-siècle building. The flat has been converted into the Dostoyevsky Literary-Memorial Museum. My spirits rose as I was warmly welcomed by a coterie of motherly, middle-aged women, who broke the long-standing tradition that museum employees in Russia must excel in gruffness to get their jobs.

Despite the grim oil paintings adorning the walls—one depicting the Last Supper (in the dining room, of course) and another, in the drawing room, showing the biblical Agony in the Garden—nothing suggests that Dostoyevsky, psychologist of tortured outcasts, was anything but a conscientious family man, born to the gentry class. His sanctum sanctorum was his study, a modest chamber with green-patterned wallpaper, a parquet floor, and a desk the size of a pool table, covered in green felt.

To the accompaniment of heavy ticktocks—in the hush, the grandfather clock in the adjacent drawing room sounded loud—I stood perusing an explanatory placard, marveling that Dostoyevsky could have been quite so domestic, even if a night owl. “The least disorder would annoy father,” one of his daughters reported. Starting at 11 p.m., he wrote in candlelit solitude, tolerating no interruptions. Around dawn he would retire, burrowing into the bed in his study, with his overcoat laid on top of the sheets. He slept until noon. He adored super-strong tea, scalding coffee, Kiev jam, chocolate, and blue raisins, which he shopped for on nearby Nevsky Prospekt, to this day the most glamorous commercial avenue in St. Petersburg. He enjoyed reading his works in public, in his “high but piercing sharp voice.”

The kindly docent posted in the sedate drawing room sabotaged my calm, supplementing the homey scene with her own narrative. Emperor Nicholas I, unsettled by the revolutions of 1848 in Europe, began cracking down on subversives not long after Dostoyevsky started attending meetings of the Petrashevsky Circle—intelligentsia who gathered to read the forbidden works of European Socialists. My guide spared no details of the special punishment the emperor had in store for Dostoyevsky and his fellow members. Arrested and ultimately thrown into the city’s hulking prison, they were first stripped to their underwear in minus-30-degree weather to face a firing squad, sacks over their heads. The drums rolled—and then, instead of gunshots, they heard a messenger galloping up to grant them commuted sentences. Dostoyevsky got four years in prison and exile in Siberia. He also got material for House of the Dead, one of the great prison novels of world literature.

Heading out into the wind-whipped streets, I went in search 104 Griboyedov Canal Embankment, where, on the third floor, in apartment 74 of entryway No. 5, the troubled young antihero of Crime and Punishment, Rodion Raskolnikov, splits open the skull of a usurious old pawnbroker with an ax butt—a scene so graphic and disturbing that I suffered nightmares after first reading it three decades ago.

When I had last visited, in September 2000, I had opened the door to the entryway and climbed the stairs, inhaling a reek of mold and urine. Standing before the apartment, I had examined its door (covered by a layer of reddish leatherette, as I remember): here Raskolnikov had hesitated before he knocked, his ax concealed beneath the folds of his ratty coat. I had the feeling that nothing, not the decrepitude, the smells, or the sepulchral light, had changed since Dostoyevsky’s day.

This time, after entering the vast courtyard, I found the entryway secured by a code-locked steel door. Frustrated, I looked up: the courtyard’s walls, streaked with grime, seemed concave and irregular, as if drawing together toward the top. A feeling of claustrophobia seized me, as it had so many of Dostoyevsky’s heroes, trapped in rooms variously described as “closets,” “dog holes,” “cabins,” and “coffins.”

I was luckier, and took refuge in the Idiot Restaurant, a hangout of the city’s artsy intelligentsia. Soothed by plush blue carpeting, brocaded oaken sofas and easy chairs, spangled chandeliers, and flickering candles, patrons nursed mugs of beer and glasses of French wine, sprawled in a relaxed way unusual in Russia. I tossed back the complimentary shot of vodka and read the menu’s salute, in twisted English, to my hero. The probably apocryphal tale of Dostoyevsky’s fleeting ownership of the place—he was forced to sell it, the story goes, to pay gambling debts—inspired a tribute that was as close to a pick-me-up as I was going to get:

Human masses were puddying in mud and dust and misery in city districts roaming public and gambling establishments. He was young, slim, and poor, maybe not handsome, but energetic talented and hot-tempered, a gambler to the bone.

I wasn’t young or energetic, but a glass of red Bordeaux helped to rally the gambling spirit that has made me the expatriate I am. Ever more stifling though the Putin era gets—and I’m betting on worse to come—I’m sticking around to watch.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.