Tersztyánszky was born in Szakolca in the Kingdom of Hungary (today Skalica, Slovakia) on 29 October 1854. He graduated from the Theresian Military Academy in Vienna in 1877 and was commissioned into the Austro-Hungarian Army. Afterwards the dragoon officer went to war school, served in the general staff and held various cavalry commands. While his stubborn, cantankerous and hot-headed behaviour often got him into trouble he nonetheless was frequently commended by his superiors and enjoyed the patronage of the heir Archduke Franz Ferdinand of Austria (until his assassination in 1914) and Chief of Staff Franz Conrad von Hötzendorf. In 1913 Tersztyánszky was promoted to the rank of General der Kavallerie.