In terms of what we know about them, the contrast between our two greatest men of letters, William Shakespeare and Charles Dickens, could scarcely be sharper. Of Shakespeare, we know next to nothing; of Dickens we know next to everything. Dickens might well have wished it otherwise: speaking of his great predecessor, he wrote to a correspondent: "It is a great comfort, to my way of thinking, that so little is known about the poet. It is a fine mystery, and I tremble every day lest something should come out."

The mystery of Charles Dickens is quite as profound as that of William Shakespeare, but it is essentially the mystery of art itself and of its roots in the deepest layers of experience and personality. Of the writer's external life, there is almost an embarrassment of riches. It was a life lived at full tilt. There are times in Michael Slater's indispensable new biography when one simply has to close the book from sheer exhaustion at its subject's expenditure of energy. It's like being sprayed by the ocean. Even Dickens was astonished at it: "How strange it is," he said, "to be never at rest!"

He started Oliver Twist halfway through writing The Pickwick Papers, and halfway through writing Twist he began Nicholas Nickleby, shooting off a constant volley of journalistic fireworks the while. Nor did he confine himself to literature. From the beginning, he took up cudgels on behalf of the socially disadvantaged. He flung himself into social life – dancing, horse-riding, performing conjuring tricks, and putting on shows for his family and friends. He walked 10, 12, 15 miles a day, communing with his imagination, but also seeking out the hidden truths of his society, throwing himself into the darkest recesses of human life. On holiday in Italy, he climbed up Vesuvius in full eruption, then witnessed a public execution, getting as close as possible to the severed head. No wonder he observed, when planning the alterations to his new house on Tavistock Square, that "a Cold Shower of the best quality, always charged to an unlimited extent, has become a necessary of life to me."

A global, all-inclusive biography of such a man is an impossibility. Recent biographies have each approached their task from a different angle, the most striking, by Peter Ackroyd, being Dickensian itself. Michael Slater, a seasoned Dickens hand, is altogether more measured, but no whit less exciting. He assembles a million accumulated details, minutely examining the genesis of each work and demonstrating the thing on which the writer himself so passionately insisted: "My own invention or imagination, such as it is . . . would never have served me as it has but for the habit of commonplace, humble, patient, daily, toiling, drudging attention."

In the earlier books, Dickens wrote out of brilliant improvisation (Slater is riveting on the evolution of Oliver Twist out of a piece that was essentially a Boz sketch), but from Dombey and Son on, they were meticulously planned. Making telling use of Dickens's notes to self ("Jo. Yes? Kill him . . . No. Decide on no love at all"), Slater carefully shows how, as each new novel comes to life, their author creates a force field of imagery and thought, feeding the process with current events, preoccupations and accidental meetings.

Forging all this into the massive and complex structures of the later novels became increasingly arduous. Small wonder that he loved to throw off simpler pieces for the magazines he edited. These journals, one weekly and one monthly, were absolutely central to his practice as a writer. It is astonishing to think of books of the scale and integrity of the great last novels being written according to the demands of this form. No doubt the absolute need to produce copy, to length and on time, suited Dickens's adrenaline-hungry temperament, but the profundity and brilliance of the writing in the circumstances is awe-inspiring. He was indifferent to his often frail physical condition: the last chapters of Bleak House were written immediately after an operation, without anaesthetic, on a fistula.

The force of his will is alarming, and often annihilating: he swept up the young actress Ellen Ternan and, because of the necessary secrecy of their life together, made her in effect a prisoner of love, robbing her of her youth and her autonomy; not for nothing did he call her The Patient in his letters. Sometimes his willpower is almost comic: when his friend Douglas Jerrold died, he whipped up a huge fund-raising campaign to provide for his widow and children, despite their protests that they were perfectly well-off. The story of his relationship with his wife Catherine, on the contrary, makes ugly reading: her one jealous reproach of him, when he practised hypnotism on the wife of a friend, is clearly the root of his increasingly savage rejection of her ("he wrote her out of his life," says Slater), while his children, especially his sons, were the subject of brutally expressed disappointment: "they have," he wrote, "the curse of limpness on them."

His feeling for his readers was, by contrast, entirely positive. His connection with them was like that of no other writer before or since. The famous public readings were the consummation of this relationship, making him the most celebrated and best loved man of his time. "To stimulate and rouse the public soul to a compassionate feeling that this must not be", he unleashed electrifying assaults on poverty, ignorance and injustice, "sledge-hammer blows" delivered in print and in person against government, business interests, moralists. His warnings to charitable organisations about spending their money on the people they were supposed to benefit, his hatred of statistical manipulation, his denunciation of the incompetent prosecution of military campaigns to the detriment of soldiers, his loathing of the profiteering convolutions of lawyers, his contempt for bankers ("slobbering, bow-paunched, overfed, apoplectic, snorting cattle") all ring loud bells today. Against this, Slater carefully sets Dickens's entrenched racism, his derision for the idea of female emancipation and his enthusiastic endorsement of capital punishment.

Slater, who has a nice line in droll asides ("Dickens can never keep wooden legs out of his writing for long"), rarely offers a judgment, but insights abound: noting the triumphant arrival of Sam Weller in The Pickwick Papers, he writes that if Pickwick were "to metamorphose into a Dickens version of Don Quixote, he would need a Sancho Panzo to ground him in reality". He takes us compellingly through all the great shocks of Dickens's life – the blacking factory; first love; second love; the railway accident – but he doesn't dwell on them, nor does he speculate on the psychological aspects of his relationship with his father and mother or with Nelly. Nor does he mention magic, Dickens's life-long obsession. All this can be found elsewhere.

His quarry is the writing. The novels are the tip of a vast iceberg, and Slater introduces us to some miraculous pieces – stories, essays, sketches – and shows how closely connected they are to the novels. It is especially pleasing that he turns the spotlight on the masterly monologues that Dickens derived from his All the Year Round serials: "The Boy at Mugby", "Mr Chops the Dwarf", "Mrs Lirriper" (in the opening of which he virtually invents stream-of-consciousness writing), and his masterpiece in this form, "Doctor Marigold".

The book is an incomparable portrait of the writing life of Dickens. Cumulatively, it is profoundly moving, chronicling the constant restless interaction between the life and the work. Slater quotes to immensely touching effect the account by Forster, Dickens's best friend and first biographer, of a day trip up river, undertaken to furnish him with material for a chapter he needed to write for Great Expectations: "he seemed to have no care, all of that summer day, except to enjoy [his friends' and family's] enjoyment and entertain them with his own in the shape of a thousand whims and fancies; but his sleepless observation was at work all the time, and nothing had escaped his keen vision on either side of the river."

Simon Callow's book Dickens' Christmas has just been reissued by Frances Lincoln.