He was born to an old Protestant Hungarian aristocratic family, dating back to 13th century, as the elder of two sons of János, Baron Lónyay de Nagylónya et Vásárosnamény (1796-1859) and his wife and cousin, Florentina, Baroness Lónyay de Nagy-Lónya et Vásárosnamény (1802-1885).
[1] His first cousin once removed was Count Elemér Lónyay de Nagylónya et Vásárosnamény (1863-1946), second husband of Crown Princess Stéphanie of Austria, who converted to Catholicism upon his marriage and was elevated into the rank of Fürst on 9 February 1917 by Charles I of Austria.
He was undersecretary of state in the government brought to power by the Hungarian Revolution of 1848, and fled when the rebellion was put down in 1849.
After his return, he championed the construction works intended to provide navigation and flood control over the Tisza river and had an active role in launching projects in the agricultural and financial sectors.
In August 1871 he was raised to the rank of Count, and in November 1871 he became Prime Minister of Hungary.