While I read Notes from Underground over the holidays, I was also reading a history of St. Petersburg (A History of Future Cities by Daniel Brook). I was struck by the parallels and connections between the city, the author, and his work.
First, here is a brief summary of the city's history. Peter the Great was the tsar of Russia in the early 1700s; he was known primarily for his desire to westernize Russia. He toured Amsterdam and worked as a shipwright's apprentice, bringing back hundreds of European craftsmen to help westernize Russia. His ultimate goal was to have a planned city, based on European capitals like Venice and Amsterdam, that would connect backwards Russia to the West, both physically, by allowing trade by sea, and culturally, as he imposed European customs and learning on the population. St. Petersburg was built by decree on land gained from Sweden on the far eastern Baltic; it was a more or less empty swamp that froze over for much of the year. Peter simply poured serfs and craftsmen in and gave a few Italian architects blank checks. The city was built with Venetian canals although they were completely useless and impractical and with a variety of Dutch townhouses, and the population was to speak French. In short, it was conceived as a way for Russia's tsars to get all of the technological benefits of Western society while shutting out dangerous ideas. Of course, that was impossible; by Dostoyevsky's time, the city consisted of a group of immensely wealthy aristocrats who lived in obscene, European-style luxury; a large population of paper-pushing bureaucrats; and a closely related group of revolutionaries inspired by the European ideas the city inevitable brought in.
The nature of St. Petersburg begs the question of whether Russia was colonizing or colonized by around the time Dostoyevsky wrote, which I think Dostoyevsky reflects. Politically, Russia was obviously an imperial power; it controlled about a sixth of the world's land area, stretching from Alaska to the Crimea, all from a seat of power in St. Petersburg. Culturally and intellectually, though, Russia was a backwards, eastern nation ruled by a small and oppressive European elite, which sold the raw goods made by the "real Russia" to Western Europe--almost the definition of a colonized people.
To return to Dostoyevsky, he initially introduces St. Petersburg, the setting of the novel, as "the most abstract and premeditated city in the whole world", an obvious reference to its artificial origin. St. Petersburg, and by extension the Western ideals that it represents, are the sort of orderly utopia that the underground man recognizes cannot work. People do not behave according to their interests, as the European idea of progress would have it, so neither a socialist utopia nor a prosperous realm of free individuals--both, again, European ideas--can ever work in reality. But if the underground man is right in rejecting the idea that people always act in their own best interests, why is he evil? According to the Norton's introduction, Dostoyevsky's "positive solution" is a conservative, Russian Orthodox faith in Christ and nationalism--clearly, from a post-colonial perspective, a turn towards "the real Russia"--the colonized Russia. The underground man is evil because he doesn't recognize this; he rejects Western order only to violate it in the most egregiously vile ways because he fails to replace it with an "irrational", but moral, philosophy like Dostoyevsky's mysticism.
Dostoyevsky's own experiences with St. Petersburg were not good, which perhaps accounts for some of his hostility towards the city. After moving to the capital to attend a military academy, he became very unsatisfied with his tedious, paper-pushing job in the military bureaucracy (a huge portion of the population was young, male bureaucrats; despite the prosperity and technological advancement dangled in front of the population, the stratified social system meant that there was a very solid glass ceiling). He joined the revolutionary elements, another Western import, of which the city was a home, and got sent to Siberia for it. He had tried both of the contradictory lives the city offered him: the conservative option of working for the government, and the option of participating in the illicit importation of European ideals, and both had punished him for it.