Ochsenheimer was born and brought up in Mainz (then in the Electorate of Mainz) and began to show an interest in butterflies and moths in his early youth. At the age of twelve he was apprenticed with a saddler but when his intellectual abilities were recognized friends of his father's enabled him to study natural history at the university. On 16 September 1788 he received his degree of "Doktor der Philosophie". He found employment as an educator with Stadtkommandant von Dallwigh in Mannheim, then with Baron von Reipelt.