In 1786, Nikolai Sergeevich entered the Leib-Guards Semenov regiment, was engaged in the Russo-Swedish War of 1788-1790. In 1793, he was transferred from lieutenant to the Leib-Guards Horse Regiment to lieutenant colonel in the army, from where he was dismissed in 1796 with the coming to power of Paul 1.
Since 1801 was in the civil service at the College of Foreign Affairs. In August 1808 he was the vice president of the Medical and Surgical Academy.
In 1809 Nikolai Sergeevich founded a printing house in Moscow. He purchased equipment for a printing house in France in the amount of 150 thousand rubles. The printing house mainly carried out orders: art, historical, medical, and other books were printed there. In 1812, after the capture of Moscow by Napoleon’s troops, General Kompan settled in the Vsevolozhsky estate, and the printing house was renamed the Imperial Printing House of the Great Army. After the liberation of Moscow, Vsevolozhsky resumed printing. In 1817, he sold his printing house to the Main Directorate of Schools in Saint Petersburg.
Nikolai Sergeevich was twice married. His second wife was French. He had 3 daughters: Lidia Nikolaevna,
Maria Nikolaevna, and Elizaveta Nikolaevna.