In 1864 Ramming was given command of the VI. Army Corps, which he also commanded in the Austro-Prussian War in 1866. Defeated by Steinmetz's V Corps at Náchod on 27 June, Ramming's corps formed the reserve at Skalitz and Sadowa. After the war he served as commanding general in Prague, Sibiu and Brno. In 1868 Ramming was promoted to "Felzeugmeister".