He was born in Vienna, where his father Baron Sándor Andreánszky served in the Council of Hungarian Court Chamber.
He involved in politics when he was still young; at the age of 17 he was a member of the Deák Party and exerted an active role during 1865 elections.
The two Andreánszky brothers, István and Gábor received the title of Baron in Hungary on 5 October 1875 by Emperor-King Francis Joseph.
in this same year he was appointed to a member of the House of Magnates but he gave a speech at first in 1883, during Tiszaeszlár Affair when he protested against the enabling of Christian-Jewish marriages.
Ónody represented the Independence faction (which rejected the Austro-Hungarian Compromise), while Andreánszky was the advocate of the pro-Ausgleich members.