Dostoevsky got involved in the Petrashevsky circle during the time of Tsar Nicholas when Petrashevsky, an influential revolutionary, approached Dostoevsky asking him about the subject of his next story. Dostoevsky never had any revolutionary aspirations and he believed in his mother’s teachings on the emphasis of love. However, he could not extricate himself from the Petrashevsky circle and was arrested in on April 22, 1849 for his alleged involvement in revolutionary activities and he was to be put on trial. When he was released from prison, he was sent to Serbia to serve in military exile.
Incidentally, the central character of Crime and Punishment also spends his time in prison in Serbia.
Source: Fyodor Dostoevsky Biography
Crime and Punishment was written by Fyodor Dostoevsky. It was published in 1866.