Gervinus was born in Darmstadt. He was educated at the gymnasium of the town, and intended for a commercial career, but in 1825 he became a student of the university of Giessen. In 1826 he went to Heidelberg, where he attended the lectures of the historian Schlosser, who became henceforth his guide and his model. In 1828 he was appointed teacher at a private school at Frankfort-on-Main, and in 1830 "Privatdozent" at Heidelberg. In this period he became a friend of the young historian Karl von Hegel (the son of the Philosopher Georg Wilhelm Friedrich Hegel) and of the jurist Georg Beseler.