Promoted to "hauptmann" (captain), Ravenstein was posted to the Imperial Guard as a battalion commander. He was serving at the Kaiser's headquarters when the war ended. Attached to the "Freikorps" from 1919, he was engaged in defending against Polish incursions along the border in the east of Germany. When the border disputes settled, he decided to leave the military rather than stay in the newly formed "Reichsheer". He was discharged on 31 March 1920 having received an honorary promotion to the rank of major.