Between 1845 and 1848, Charles Dickens wrote fragments of autobiography excerpts of which he showed to his wife and John Forster.

On 7 January 1849, Dickens visited Norwich and Yarmouth in Norfolk, with two close friends, John Leech (1817–1864) and Mark Lemon (1809–1870). Leech was an illustrator at Punch, a satirical magazine, and the first illustrator for A Christmas Carol by Dickens in 1843. Lemon was a founding editor of Punch, and soon a contributor to Household Words, the weekly magazine Dickens was starting up; he co-authored Mr Nightingale's Diary, a farce, with Dickens in 1851. The two towns, especially the second, became important in the novel, and Dickens informed Forster that Yarmouth seemed to him to be "the strangest place in the world" and that he would "certainly try my hand at it". During a walk in the vicinity of Yarmouth, Dickens noticed a sign indicating the small locality of Blunderston, which became in his novel the village of "Blunderstone" where David is born and spends his childhood.

A week after Charles's arrival in Yarmouth, his sixth son, Henry Fielding Dickens, was named after Henry Fielding, his favorite past author. Per Forster, Dickens refers to Fielding "as a kind of homage to the novel he was about to write".

As always with Dickens, when a writing project began, he was agitated, melancholy, "even deeper than the customary birth pangs of other novels"; as always, he hesitated about the title, and his working notes contain seventeen variants, "Charles Copperfield" included. After several attempts, he stopped on "The Copperfield Survey of the World as it Rolled", a title that he retained until 19 April. When Forster pointed out that his hero, now called David, has his own initials transposed, Dickens was intrigued and declared that this was a manifestation of his fate. He was not yet sure of his pen: "Though I know what I want to do, I am lumbering like a train wagon", he told Forster.

Changes in detail occur during the composition: on 22 August 1849, while staying on the Isle of Wight for a family vacation, he changed on the advice of Forster, the theme of the obsession of Mr Dick, a secondary character in the novel. This theme was originally "a bull in a china shop" and became "King Charles's head" in a nod to the bicentenary of the execution of Charles I of England.

Although plunged into the writing of his novel, Dickens set out to create a new journal, Household Words, the first issue of which appeared on 31 March 1850. This daunting task, however, did not seem to slow down the writing of David Copperfield: I am "busy as a bee", he writes happily to the actor William Macready.

His third daughter was born on 16 August 1850, called Dora Annie Dickens, the same name as his character's first wife. The baby died nine months later after the last serial was issued and the book was published.

Dickens marked the end of his manuscript on 21 October 1850 and felt both torn and happy like every time he finished a novel: "Oh, my dear Forster, if I were to say half of what Copperfield makes me feel to-night, how strangely, even to you, I should be turned inside out! I seem to be sending some part of myself into the Shadowy World".

"The Personal History, Adventures, Experience, and Observation of David Copperfield the Younger, of Blunderstone Rookery" was published from 1 May 1849 to 1 November 1850 (3 chapters per month) in 19 monthly one-shilling installments, containing 32 pages of text and two illustrations by Hablot Knight Browne ("Phiz"), with a title cover, simplified to The Personal History of David Copperfield. The last installment was a double-number. On the other side of the Atlantic, John Wiley & Sons and G P Putnam published a monthly edition, then a two-volume book version.