Kuhn was born 15 July 1817 in Proßnitz, Moravia, Austrian Empire (now Prostějov in the Czech Republic), the son of Major Franz von Kuhn (1772-1842), who had been ennobled in 1823, and the farmer's daughter Johanna Schwab (1787-1856). He graduated with distinction from the Theresian Military Academy in Wiener Neustadt and entered military service in 1837. He served on the quartermaster general staff as a Major during the wars of 1848 and 1849 in Italy and Hungary. Subsequently, Kuhn was chief of the general staff of the 11th army corps in Hungary for several years. In 1852 he was granted baronial status and married Rosa von Thuren. He was promoted to Oberstleutnant (lieutenant colonel) in 1853. In 1856, Kuhn became professor of military strategy at the military academy in Vienna. He participated in the Second Italian War of Independence in 1859, as chief of general staff to Field Marshal Ferenc Gyulay, On 29 October 1863, he was promoted to the rank of Major General.