A by-election was held in the United Kingdom parliamentary constituency of Selby and Ainsty in North Yorkshire on 20 July 2023, following the announcement on 10 June that the incumbent Conservative Party member of Parliament (MP), Nigel Adams, was standing down from Parliament with immediate effect. Adams had previously announced his intention to stand down as an MP at the next general election, with the party having selected a candidate to succeed him the previous day. Adams formally confirmed his resignation on 12 June.