Ainsworth briefly tried the publishing business, but soon gave it up and devoted himself to journalism and literature. His first success as a writer came with Rookwood in 1834, which features Dick Turpin as its leading character. A stream of 39 novels followed, the last of which appeared in 1881. Ainsworth died in Reigate on 3 January 1882.
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.
The Ainsworth family moved to Smedly Lane, north of Manchester in Cheetham Hill, during 1811. They kept the old residence in addition to the new, but resided in the new home most of the time. The surrounding hilly country was covered in woods, which allowed Ainsworth and his brother to act out various stories. When not playing, Ainsworth was tutored by his uncle, William Harrison. In March 1817, he was enrolled at Manchester Grammar School, which was described in his novel Mervyn Clitheroe. The work emphasised that his classical education was of good quality but was reinforced with strict discipline and corporal punishment. Ainsworth was a strong student and was popular among his fellow students. His school days were mixed; his time within the school and with his family was calm even though there were struggles within the Manchester community, the Peterloo Massacre taking place in 1819. Ainsworth was connected to the event because his uncles joined in protest at the incident, but Ainsworth was able to avoid most of the political after-effects. During the time, he was able to pursue his own literary interests and even created his own little theatre within the family home at King Street. Along with his friends and brother, he created and acted in many plays throughout 1820.
During 1820, Ainsworth began to publish many of his works under the name "Thomas Hall". The first work, a play called The Rivals, was published on 5 March 1821 in Arliss's Pocket Magazine. Throughout 1821, the magazine printed seventeen other works of Ainsworth's under the names "Thomas Hall", "H A" or "W A". The genre and forms of the work greatly varied, with one being a claim to have found plays of a 17th-century playwright "William Aynesworthe", which ended up being his own works. This trick was later exposed. In December 1821, Ainsworth submitted his play Venice, or the Fall of the Foscaris to The Edinburgh Magazine. They printed large excerpts from the play before praising Ainsworth as a playwright as someone that rivalled even George Gordon Byron. During this time, Ainsworth was also contributing works to The European Magazine in addition to the other magazines, and they published many of his early stories. Eventually, he left Manchester Grammar School in 1822 while constantly contributing to magazines.
After leaving school, Ainsworth began to study for the law and worked under Alexander Kay. The two did not get along, and Ainsworth was accused of being lazy. Although Ainsworth did not want to pursue a legal career, his father pushed him into the field. Instead of working, Ainsworth spent his time reading literature at his home and various libraries, including the Chetham Library. He continued to work as an attorney in Manchester and spent his time when not working or reading at the John Shaw's Club. By the end of 1822, Ainsworth was writing for The London Magazine, which allowed him to become close to Charles Lamb, to whom he sent poetry for Lamb's response. After receiving a favourable reception for one set of works, Ainsworth had them published by John Arliss as Poems by Cheviot Ticheburn. He travelled some during 1822, and visited his childhood friend James Crossley in Edinburgh during August. There, Crossley introduced Ainsworth to William Blackwood, the owner of Blackwood's Magazine, and, through Blackwood, he was introduced to many Scottish writers.
Besides Crossley, another close friend to Ainsworth was John Aston, a clerk who worked in his father's legal firm. In 1823, Ainsworth and Crossley began to write many works together, including the first novel Sir John Chiverton that was based around Hulme Hall in Manchester. Ainsworth wrote to Thomas Campbell, editor of The New Monthly Magazine, about publishing the work: but Campbell lost the letter. At the request of Ainsworth, Crossley travelled to London to meet Campbell and discuss the matter before visiting in November. Although the novel was not yet published, in December 1823, Ainsworth was able to get G. and W. Whittaker to publish a collection of his stories as December Tales. During 1824, Ainsworth set about producing his own magazine, The Boeotian, which was first published on 20 March but ended after its sixth issue on 24 April.
Ainsworth's father died on 20 June 1824 and Ainsworth became a senior in the law firm and began to focus on his legal studies. To this end he left for London at the end of 1824 to study under Jacob Phillips, a barrister at King's Bench Walk. Ainsworth lived at Devereux Court, a place that was favoured by Augustine writers. During his stay, he visited Lamb, but felt let down by the real Lamb. Ainsworth attended Lamb's circle, and met many individuals including Henry Crabb Robinson and Mary Shelley. During the summer of 1825, Ainsworth returned on a trip to Manchester in order to meet Crossley before travelling to the Isle of Man. He continued to write, and a collection of his poems called The Works of Cheviot Tichburn, with the types of John Leigh was published. He also had two works published in The Literary Souvenir, a magazine published by John Ebers.
On 4 February 1826, Ainsworth came of age and on 8 February was made a solicitor of the Court of King's Bench. During this time, he befriended Ebers, who also owned the Opera House, Haymarket. Ainsworth would constantly visit shows at the house, and he fell in love with Ebers's daughter Fanny during his visits. The relationship with the Ebers family continued, and John published a pamphlet of Ainsworth's called Considerations on the best means of affording Immediate Relief to the Operative Classes in the Manufacturing Districts. The work, addressed to Robert Peel, discussed the economic situation in Manchester along with the rest of Britain. By June, Ainsworth left politics and focused on poetry with the publication of Letters from Cokney Lands. While these were printed he continued to work on his novel Sir John Chiverton and sought to have it published.
The novel was published by Ebers in July 1826. Ebers became interested in Ainsworth's novel early on and started to add discussions about it in The Literary Souvenir in order to promote the work. Although the work was jointly written and sometimes claimed by Aston as solely his, many of the reviews described the novel as Ainsworth's alone. The novel also brought Ainsworth to the attention of historical novelist Walter Scott, who later wrote about the work in various articles; the two later met in 1828. During that year, J. G. Lockhartt published Scott's private journals and instigated the notion that the novel was an imitation of Scott. Sir John Chiverton is neither a true historical novel nor is it a gothic novel. It was also seen by Ainsworth as an incomplete work and he later ignored it when creating his bibliography. The novel does serve as a precursor to Ainsworth's first major novel, Rookwood.
Ainsworth's relationship with the Ebers family grew, and he married Fanny on 11 October 1826 with little warning to his family or friends. Ebers promised to pay a dowry of 300 pounds, but the funds were never given and this caused a strain in the relationship between Ainsworth and his father-in-law. Ainsworth continued in Ebers's circle and attended many social events. He was encouraged by Ebers to sell his partnership in the Ainsworth law firm along with starting a publishing business. Ainsworth followed this advice, and the business had early success. In 1827, Fanny gave birth to a girl who took her name. Soon after, Ebers went bankrupt and Ainsworth lost a large sum as a consequence. Ainsworth published a few popular works, including The French Cook, an annual magazine called Mayfair, and some others. By 1829, Ebers took over Ainsworth's publishing business, and Fanny gave birth to another daughter, Emily, soon after. Ainsworth gave up on publishing and resumed working in law. When a third daughter, Anne, was born in 1830, Ainsworth's family began to feel financially strained. Ainsworth returned to writing and he contributed to Fraser's Magazine, but it is uncertain how many works were actually his. However, he was working on his novel Rookwood.
By 1829, Ainsworth was neither a lawyer nor a publisher; indeed he did not have any employment at all. He longed for his youthful days in Manchester and pondered writing another novel. By the summer, he had begun to travel. It was during this time that he began to develop the idea of Rookwood, and began searching for information on the subject. While researching for the novel in 1830, Ainsworth was living at Kensal Lodge. He worked on some theatrical pieces and spent the rest of his time working in the legal profession. He soon became friends with William Sergison, and the two travelled to Italy and Switzerland during that summer. During their travels, they visited the tomb of Percy Bysshe Shelley and John Keats, along with witnessing other notable scenes in the lives of the British Romantic poets. Sergison was also the owner of a residence in Sussex, upon which Ainsworth drew in his novel. After the two returned to London, Ainsworth began working for Fraser's Magazine, which was launched in 1830. The group included many famous literary figures of the day, including Samuel Taylor Coleridge, Robert Southey, Thomas Carlyle, James Hogg and William Makepeace Thackeray. It was not until a visit to Chesterfield towards the end of 1831 that he was fully inspired to begin writing the novel, which he did self-confessedly "in the bygone style of Mrs Radcliffe".
Although he began writing the novel, Ainsworth suffered from more of his father-in-law's financial problems and was unable to resume work on it until 1833. During the autumn of that year he managed to complete large portions of the novel while staying in Sussex, near Sergison's home. The novel was published in April 1834 by Richard Bentley and contained illustrations by George Cruikshank. After working five years in the legal profession, Ainsworth gave it up and dedicated himself to writing. Rookwood garnered wide critical and financial success, and pleased his associates at Fraser's Magazine. He started to dress as a dandy, and he was introduced to the Salon of Margaret Power, Countess of Blessington. Her Salon was a group of men and literary women, and would include many others but many in London believed that Blessington had a damaged reputation. However, this did not stop Ainsworth from meeting many famous British authors from the Salon. While part of her circle, he wrote for her collection of stories called The Book of Beauty, published in 1835. Ainsworth continued in various literary circles, but his wife and daughters did not; he stayed in Kensal Lodge while they lived with Ebers. During this time, Ainsworth met Charles Dickens and introduced the young writer to the publisher Macrone and to George Cruikshank. Ainsworth also introduced Dickens to John Forster at Kensal Lodge, initiating a close friendship between the two.
From 1835 until 1838, Ainsworth and Dickens were close friends and often travelled together. Rookwood was published in multiple editions, with a fourth edition in 1836 including illustrations by Cruikshank, which started the working relationship between the two. Ainsworth began writing another novel in 1835. Called Crichton, he devoted much of his time to it to the point of not having time for many of his literary friends. Its publication was temporarily delayed while Ainsworth was searching for an illustrator, with Thackeray being a possible choice. However, Ainsworth felt the illustrations were unsatisfactory, so he switched to Daniel Maclise, who was also later dropped. Coinciding with the search for an illustrator and hurrying to complete the novel, Ainsworth was asked to write for the magazine The Lions of London, but could not find the time to work on both projects and so attempted to finish the novel. The situation changed after Macrone, the original intended publisher, died. Ainsworth turned to Bentley as a publisher. Ainsworth eventually published his third novel in 1837. A fifth edition of Rookwood appeared in 1837, and its success encouraged Ainsworth to work on another novel about a famous outlaw, the story of Jack Sheppard.
Ainsworth's next novel, Jack Sheppard, was serially published in Bentley's Miscellany (January 1839 - February 1840). Charles Dickens's Oliver Twist also ran in the magazine (February 1837- April 1839). A controversy over these Newgate novels developed between the two men, culminating in Dickens' retirement from the magazine editorship. His departure made way for Ainsworth to replace him at the end of 1839. Jack Sheppard was published in a three volume edition by Bentley in October 1839, and eight different theatrical versions of the story were staged in autumn 1839. Ainsworth followed Jack Sheppard with two novels: Guy Fawkes and The Tower of London. Both ran through 1840, and Ainsworth celebrated the conclusion of The Tower of London with a large dinner party to celebrate the works.
With the 1840 novels finished, Ainsworth began to write Old St. Paul's, A Tale of the Plague and the Fire. The work ran in The Sunday Times from 3 January 1841 to 26 December 1841, which was an achievement as he became one of the first writers to have a work appear in a national paper in such a form. His next works, Windsor Castle and The Miser's Daughter, appeared in 1842. The first mention of Windsor Castle comes in a letter to Crossley, 17 November 1841, in which Ainsworth admits to writing a novel about Windsor Castle and the events surrounding Henry VIII's first and second marriages. The Miser's Daughter was published first, starting with the creation of Ainsworth's Magazine, an independent project that Ainsworth started after leaving Bentley's Miscellany. To create the magazine, Ainsworth joined up with Cruikshank, who would serve as the illustrator. Cruikshank moved his efforts from his own magazine, The Omnibus, to the new magazine, and an advertisement for it appeared in December 1841, saying that the first issue would be published on 29 January 1842. The opening of the magazine was welcomed by contemporary members of the press, which only increased as the magazine proved to be successful. Ainsworth's Magazine marked the height of his career.
Ainsworth hoped to start publishing Windsor Castle in his magazine by April, but he was delayed when his mother died on 15 March 1842. John Forster wrote to Ainsworth to offer assistance in writing the novel, but there is no evidence that Ainsworth accepted. The work was soon finished and started appearing in the magazine by July 1842, where it ran until June 1843. George Cruikshank, illustrator for The Miser's Daughter, took over as illustrator for Windsor Castle after the first one finished its run. A play version of The Miser's Daughter by Edward Stirling appeared in October 1842, with another version by T. P. Taylor in November. During this time, Ainsworth had many well-known contributors to his magazine, including the wife of Robert Southey, Robert Bell, William Maginn in a posthumous publication, and others. By the end of 1843, Ainsworth had sold his stake in Ainsworth's Magazine to John Mortimer while remaining as editor. The next work that Ainsworth included in his magazine was Saint James's or the Court of Queen Anne, An Historical Romance, which ran from January 1844 until December 1844. The work was illustrated by George Cruikshank, which marks the last time that Ainsworth and Cruikshank collaborated on a novel.
In 1844, Ainsworth helped in the building of the monument to Walter Scott in Edinburgh. He spent his year visiting many people, including members of the British nobility. The popularity of his magazine decreased over that year due to a lack of quality works, except for a series by Leigh Hunt, A Jar of Honey from Mount Hybla. Even Ainsworth's own work, St James's, was damaged because it was written in haste. During this time, Ainsworth began one of his best novels, Auriol, but it was never finished. It was published in part between 1844–1845 as Revelations of London. Hablot Browne, using the name "Phiz", illustrated the work and became the main illustrator for the magazine. The novel was being produced until Ainsworth and Mortimer fought in early 1845 and Ainsworth resigned as editor. Soon afterwards, Ainsworth bought The New Monthly Magazine and started asking contributors to Ainsworth's Magazine to join him at the new periodical. He issued an advertisement saying that there would be contributors of "high rank", which caused Thackeray to attack him in Punch for favouring the nobility. However, Thackeray later contributed to the magazine, along with others including Hunt, E V Keanley, G P R James, Horace Smith, and Edward Bulwer-Lytton. Ainsworth reprinted many of his own works in the magazine along with his own portrait, the latter provoking a mock portrait of the back of Ainsworth's head in Punch as the only angle that Ainsworth had not yet published for the public.
In 1845, two of Ainsworth's friends and contributors died, Laman Blanchard and Richard Barham. Later in the year, Ainsworth was able to regain control over Ainsworth's Magazine and continued to republish many of his earlier works. He spent much of his time recruiting contributors to the two magazines, and published a new work in 1847, James the Second but claimed only to be the "editor" of the work. By 1847, he was able to purchase the copyright of many of his earlier works in order to reissue them. During this time, he was working on what would be his best novel, The Lancashire Witches. By the end of 1847, the plan of the novel was finished and the work was to be published in The Sunday Times.
In April 1872, a version of The Miser's Daughter, called Hilda, was produced for the Adelphi Theatre by Andrew Halliday. On 6 April 1872, Cruikshank submitted a letter to The Times, claiming that he was upset about his name being left out of the credits for the play. Additionally, he claimed that the idea for the novel came from himself and not from Ainsworth. This provoked a controversy between the two.
His first success as a writer came with Rookwood in 1834, which features Dick Turpin as its leading character. In 1839 he published another novel featuring a highwayman, Jack Sheppard. From 1840 to 1842 he edited Bentley's Miscellany, from 1842 to 1853, Ainsworth's Magazine and subsequently The New Monthly Magazine.
His Lancashire novels cover altogether 400 years and include The Lancashire Witches, 1848, Mervyn Clitheroe, 1857, and The Leaguer of Lathom. Jack Sheppard, Guy Fawkes, 1841, Old St Paul's, 1841, Windsor Castle, 1843, and The Lancashire Witches are regarded as his most successful novels. He was very popular in his lifetime and his novels sold in large numbers, but his reputation has not lasted well. As John William Cousin argues, he depends for his effects on striking situations and powerful descriptions, but has little humour or power of delineating character. S.T. Joshi has characterized his output as an "appalling array of dreary and unreadable historical novels.
Historians have criticised the mingling of fact and fiction in his novels, noting that his romanticised treatment of Dick Turpin became rapidly accepted (popularly) as historical fact, while his novelisation of the 1612 Lancashire witch trials similarly distorted real events into a Gothic form.
Ainsworth was largely forgotten by critics after his death. In 1911, S. M. Ellis commented: "It is certainly remarkable that, during the twenty-eight years which have elapsed since the death of William Harrison Ainsworth, no full record has been published of the exceptionally eventful career of one of the most picturesque personalities of the nineteenth century."
Ainsworth's 1854 novel, The Flitch of Bacon, led to the modern revival of the flitch of bacon custom at Great Dunmow in Essex, whereby married couples who have lived together without strife are awarded a side of bacon. Ainsworth himself encouraged the revival by providing the prizes for the ceremony in 1855. The Dunmow Flitch Trials, in turn, were the basis for the 1952 film Made in Heaven starring Petula Clark. Ainsworth also appears as a character in the historical novel Shark Alley: The Memoirs of a Penny-a-Liner by Stephen Carver (2016), in which the Newgate Controversy is dramatized.