Born in Oberbalbach, Ehrler grew up in the Weimar Republic and Nazi Germany as one of 12 children in his family. He joined the military service in the Wehrmacht in 1935, initially service with the artillery and anti-aircraft artillery. He participated in the Spanish Civil War and following the outbreak of World War II transferred to the Jagdwaffe (fighter force).