From my study window, I can see the top of the square, pinnacled tower of St Luke's Church, Chelsea. In this church, in 1836, Charles Dickens, aged 24, married Catherine Hogarth. It was a rare venture for him into the south-west of the city – though Chelsea was effectively a village suburb in those days – as Dickens was resolutely a north London man, his "manor" running from Somers Town and Camden south to the City, down to the Strand and Waterloo bridge, taking in Marylebone and Covent Garden. In later life, the northern edge of Hyde Park was about as far west as he would venture and once, when he rented a house on the south side of the park in Knightsbridge, he felt decidedly uncomfortable. The year 1836 was also significant for another reason: Dickens not only married but he began to be rich. He was writing for four publishers and that year earned a bonus of £500 for The Pickwick Papers. Three years earlier, as a journalist, he had been producing sketches of urban life for a magazine called The Monthly, unpaid.

One of the most fascinating undercurrents of this fascinating biography has to do with Dickens and money. All writers write for money (apart from those rare few in possession of a private income) and for Dickens – whose indigent father, John, was imprisoned for debt in the Marshalsea – solvency and riches were in a very real sense the holy grail. His childhood and early adolescence were marked by a descent into ever less-genteel poverty. It was poverty that denied him an education and shamefully sent him instead to work in a blacking factory by Hungerford bridge when he was 12. He was in gainful but impecunious employ at the age of 15, working as a junior clerk in a lawyer's office. So, by the year of his marriage, at 24 – which seems young to us now – he had already been earning his living for almost 10 years and, in addition, had published Sketches by Boz and The Pickwick Papers.

Dickens was never poor again – though there were a few tricky periods during the 1840s, when he had to borrow money and live abroad. As he aged, his earning power increased, and so too did the number of people dependent on him – his large and feckless family and numerous friends and beneficiaries relied on him for financial support. He was probably never richer than in the last years before he died. His public readings in the 1860s brought him in a gusher of cash and his second American tour (1867) netted him profits of £20,000. Claire Tomalin suggests multiplying by a factor of 70 to gain a sense of what mid-19th-century pounds might be worth today. Therefore, £20,000 is £1.4m. When he was paid an advance of £6,000 for Our Mutual Friend in 1864, we should think of it as close to £420,000. And income tax stood at less than 7%.

Dickens lived well – in his pomp, he calculated that he needed around £9,000 a year (£630,000) to provide for his extended family and dependents, and to keep him in the style he was accustomed to. Among one of the last things he did before he died was carry out an inventory of his extensive cellars at his big house, Gad's Hill, in Kent, noting entries for sherry, brandy, rum and one "cask very fine Scotch whisky, 30 gallons". Dickens, in addition, was a heavy drinker, though probably not an alcoholic.

That "probably" is key. Leon Edel, biographer of Henry James, defined a biographer as "a novelist, on oath". It's a valid aphorism and worth bearing in mind, particularly when dealing with a writer as famous and as shrouded with legend and anecdote as Dickens. One of the reasons why it's so intriguing to learn how much money he made is that it strips away some mythic veils – Dickens was a great artist, but he was also a very human being. Tomalin's biography – always scrupulous about what we can know, what we can deduce and what is mere speculation – paints a portrait of a complex and exacting man. He was at once vivacious and charming, charismatic and altruistic and possessed of superabundant energies – "Dickens kept going," Tomalin notes, "by taking on too much" (for example, in 1838 he was writing Oliver Twist and Nicholas Nickleby simultaneously). But he was also, equally – to an almost schizoid degree – tormented, imperious, vindictive and implacable, once wronged.

These matters are particularly focused when it comes to the story of Dickens's marriage and his long affair with the young actress Nelly Ternan. Dickens, aged 45, fell for Ellen Ternan when she was 18. It was simply – like Pip's love for Estella in Great Expectations – because she was "irresistible", he claimed. Dickens had long been unhappy in his marriage – a union that had produced 10 children by this time – and his infatuation with Nelly brought out the worst in him. He publicly separated from Catherine, humiliating her in the cruellest manner, and, after a form of courtship with Nelly – who did not yield to his importuning immediately – set her up as his mistress in a series of houses on the outskirts of London. This was done in the greatest secrecy, and it's something of a miracle that we know about this side of Dickens's life at all.

However, by the time he had succeeded in finally establishing this new menage to his satisfaction, Dickens was ageing and ailing. Perhaps the strain of living this lie in Victorian England provoked undue stress – we must never forget how internationally famous he was – but by his early 50s Dickens was prematurely aged, suffering from terrible gout (he could often hardly walk), piles, neuralgia and, later, the effects of a minor stroke. George Eliot described him in 1870 as "dreadfully shattered". He had been an enthusiastic cigar smoker since the age of 15 and the late photographs show a raddled, smoker's face with grizzled beard and deep lines. Probably the worst thing he could do as his health gave way was to embark on a punishing series of tours giving public readings from his novels. He was so weak he sometimes had to be helped on and off the stage, but he fed off the adoration of the thousands of his readers who turned out to hear him at home and in America. Yet, while the relentless schedule may have hastened his death, it was also a great succour to his ego and his bank balance – "Think of it," he once said gleefully to his manager, "£190 a night [£14,000]." He died in 1870 from a cerebral haemorrhage, aged 58, with his last novel, The Mystery of Edwin Drood, unfinished.

The work remains and endures – and Tomalin analyses the novels with great acuity – but what is so valuable about this biography is the palpable sense of the man himself that emerges. Tomalin doesn't hesitate to condemn Dickens when his behaviour demands it, yet she writes throughout with great sympathy and unrivalled knowledge in the most limpid and stylish prose. She has the gift of being able to set a scene and a time with compelling vividness. This is a superb biography of a great writer – and is a beautifully produced book, it should be said, with copious illustrations. It is worthy to stand beside Richard Ellmann on Joyce, Donald Rayfield on Chekhov and Jean-Yves Tadie on Proust – all three writers who deserve that rarest of accolades, genius. Like Dickens, they were complicated and often extremely difficult and demanding individuals. The more we learn about them as people – paradoxically – the greater their art resonates with us.

William Boyd's new novel, Waiting for Sunrise, will be published by Bloomsbury in March