Kegel was born in Rammelburg (now part of the town Mansfeld) and studied in Copenhagen. In the winter of 1826/1827 he went to Saint Petersburg. In 1841 he was sent by the Russian government to Kamchatka to investigate possibilities of agriculture and mining in that region. He traveled through Siberia, embarked in Okhotsk, only to arrive shipwrecked in Kamchatka.
From Petropavlovsk, he undertook various voyages of several months into the heart of the country in order to examine the soil conditions and perform trial sowing. He travelled during the summer, even though traveling during this time was extremely strenuous and paths virtually impassable. His reports describe in detail flora and fauna, soil, geology as well as the life of the local population. Kegel discovered mineral resources and saw the potential wealth of the country if managed well. In addition, he made proposals for improving the living conditions of the indigenous population and criticized oppression.
Kegel was loathed by the corrupt local administration, who were not interested in the development of the country but rather in their own profit from fur trade. When they realized that Kegel was incorruptible, he was victimized whenever possible. Still he succeeded in accomplishing his work and returned - in poor state of health - in 1847. His reports were the most precise ones of this era, but could not be published in his lifetime, since this would have meant loss of freedom or worse.