A by-election was held for the New South Wales Legislative Assembly seat of Hornsby on 19 October 2024, following the resignation of Liberal Party MP Matt Kean.
The by-election was triggered by the resignation of Liberal MP Matt Kean, who served as the state party's deputy leader and as the state's Treasurer under Premier Dominic Perrottet. He held many other ministerial roles under both Perrottet and his predecessor, Gladys Berejiklian. Kean is a member of the party's Moderate faction, and during Perrottet's tenure as Premier was regarded as the faction's de facto leader in New South Wales.
Hornsby is a blue-ribbon seat in northern Sydney, and is one of two of the original post-1927 electoral districts to have only ever been held by the Liberal Party, its predecessors or an independent, the other being Vaucluse.
On 3 August 2024, the Liberal Party preselected James Wallace. Wallace's preselection was unsuccessfully contested by former Deputy Mayor of Hornsby Michael Hutchence and barrister Ishita Sethi.
The governing Labor Party has stated they will not contest this by-election with Premier Chris Minns stating "a swing against us would be a massive distraction".
On 16 August 2024, One Nation announced their candidate as Steve Busch, who previously stood at the 2023 state election.
The Libertarian Party announced Marc Hendrickx as their candidate on 19 September 2024. The Sustainable Australia Party has preselected Justin Thomas.