Krieghammer attended the Theresian Military Academy in Wiener Neustadt, enlisted as a lieutenant in the 5th Imperial and Royal Dragoons regiment in 1849 and then fought on the Austrian side in the Hungarian Revolution. He participated in the Second Italian War of Independence in 1859 and the Austro-Prussian War in 1866, with the rank of Rittmeister. After a period in the Kriegsschule, he was promoted to Major and wing-adjutant of the Emperor in 1869, then Oberst in 1874, Major general in 1879, and finally Lieutenant field marshal in 1881.