 Originally not seeking a military career as a family tradition, Berg enrolled into the Philosophy faculty of Imperial University of Dorpat in 1810.But after Napoleon invaded of Russia in 1812, Berg dropped out from university and voluntarily entered the Russian Imperial Army.He entered the army as a Fahnenjunker and was enlisted into the 6th Libau Infantry Regiment which was stationed at the north-western part of Russia to defend against Napoleon.