 Ainsworth contested the Barrow-in-Furness constituency at the 1886 general election.He faced the sitting Member of Parliament, William Sproston Caine who had been elected earlier that year in a by-election as a Liberal but had switched to the Liberal Unionist Party.Ainsworth did not fight the general elections of 1892 or 1895 but in 1900 he was chosen to contest Argyllshire.