Ainsworth was born on 4 February 1805 in the family house at 21 King Street, Manchester, to Thomas Ainsworth, a prominent Manchester lawyer, and Ann (Harrison) Ainsworth, the daughter of the Rev. Ralph Harrison, the Unitarian minister at Manchester Cross Street Chapel. On 4 October 1806, Ainsworth's brother, Thomas Gilbert Ainsworth, was born. Although the family home was eventually destroyed, it was a three-storey Georgian home in a well-to-do community. The area influenced Ainsworth with its historical and romantic atmosphere, which existed until the community was later replaced by commercial buildings. Besides the community, Ainsworth read romantic works as a child and enjoyed stories dealing with either adventure or supernatural themes. Of these, Dick Turpin was a favourite of Ainsworth. During his childhood, he adopted Jacobean ideas and held Tory ideas in addition to his Jacobite sympathies, even though his community was strict Whig and Nonconformist. During this time, Ainsworth began to write prolifically.