Alcohol and drug abuse are leitmotifs of writers’ lives and work, from ­Thomas De Quincey’s “Confessions of an English Opium Eater” to Caroline Knapp’s “Drinking: A Love Story.” As Peter ­Ackroyd shows in his study of a Victorian writer who was a major creator of the detective novel, Wilkie Collins could have taken on all comers. At one point, the author of “The Woman in White” and “The Moonstone” consumed, in a single glass, enough laudanum (a potent combination of opium and alcohol) to kill 12 people. He loved cigars, drank heavily — preferably brut Champagne — and usually ate rich French food. With these appetites, it’s not surprising that he complained of “gout of the brain.” The wonder is that he wrote at all, let alone that his output was prodigious: novels, short stories, travelogues, essays, plays, even disquisitions on advice columns.

Ackroyd paints a portrait of a man of great charm, with friends among a host of Victorian artists, writers and musicians. Although Collins maintained separate households with two women, neither of whom he married, he was a strong advocate for women’s legal rights and looked after both of his mistresses and their children, even educating one daughter who was not his own. Ackroyd repeatedly shows that the strongest characters in Collins’s novels were women, whether heroines or villains.

In adolescence, Collins was fired with the literary ambition that carried him through life: He wrote his first novel (unpublished) while still in his teens. After the death of his artist father, the young man wrote a memoir of the senior Collins that set him, at age 24, on his professional career. Collins’s major break came in 1851, when Charles Dickens invited him to take part in an amateur theatrical. Soon Collins was writing for Dickens’s popular weekly Household Words and finishing his first successful novel. Called “The Woman in White,” it was an instant success. Within a few years, Collins would become second only to Dickens as a popular and sensational writer in England and America. In 1868, when “The Moonstone” began appearing in serial form in another Dickens weekly, All the Year Round, crowds gathered outside the magazine’s offices, waiting to snatch the latest installment.

Collins’s life seems to have been one of incessant tumult. Ackroyd documents year after year of illness, followed by trips abroad or to the English seaside. Collins maintained an exhausting writing schedule — sometimes with his swollen, bloody eyes bandaged, forced to dictate his texts. (Carrie Graves, his mistress’s daughter, often acted as his secretary.) In the summer of 1889, he suffered a stroke and died in late September, yet even in those last months he was still feverishly working.