He studied at the Imperial Forestry Institute in Saint Petersburg, graduating in 1841 and joining the staff of the forestry department of the Ministry of State Domains.
The two men travelled to London in 1858 and 1859, meeting Alexander Herzen and Nikolay Ogarev.
Shelgunov returned to Russia and got involved with Nikolay Chernyshevsky contributing to the journals Russkoe slovo, Sovremennik, and Vek.
[3] He participated in the revolutionary movement of the 1860s co-writing To the Younger Generation with Mikhailov.
He also wrote the unpublished proclamation To Russian Soldiers From Their Well-wishers.