He was the son of Hans Christoph von Gagern, minister of state in Nassau; he attended the gymnasiums at Kreuznach, Mannheim, and Weilburg, and studied law from 1826 at Heidelberg, Utrecht, and Göttingen. After a stay in Paris he received in 1829 a position in the cabinet of William I, King of the Netherlands. At the outbreak of the Belgian Revolution (1830) he joined the Dutch army as a volunteer and took part in the war against Belgium. In 1833 he retired from the service of the Netherlands, married Franzina Lambert, of The Hague, and took up historical studies in order to fit himself for the position of Privatdozent at Bonn University. He was at Bonn during the years 1837-40. In 1837, although still a Protestant, he sided with the imprisoned Archbishop of Cologne, Droste-Vischering, and thus lost the favour of the Prussian Government. In 1840 he was appointed ministerial successor with the title of Legationsrat by the Duke of Nassau.