 In 1834 he was elected to the House of Commons as a Whig member of parliament for Bolton, and he held the seat until 1847, serving alongside William Bolling and John Bowring.He lived mostly at Smithills Hall, part of which he rebuilt, while his younger brother, John Horrocks Ainsworth (1800–65), carried on the family business.Ainsworth became a Deputy Lieutenant for the county of Lancashire and a Justice of the Peace.