Haushofer continued his career as a professional soldier after the annexation of Bavaria by Germany, serving in the army of Imperial Germany and returning to teach War History at the Military Academy in Munich.