O’Brian was an Englishman, he assumed the new name and faux Irishness when he abandoned his former life shortly after WW II, in which he is said to have served in the propaganda branch of the SOE* (Political Warfare Executive, was it called?) None of his bio information suggests he had any addictions, including the stories about the past he tried to cover up, but it’s certainly suggestive that his alter-ego Maturin is frequently using either laudanum or coca. O’Brian was born into a hard-drinking class in a hard-drinking time, at least, whatever his experience with other drugs.
He abandoned his family, undeniably a shabby thing to do, but it was done when he was a young man. Who knows the circumstances of his family life, whether it was entirely his fault or not. It probably was his fault, though, as it happened after he had fallen in love with another married woman. He eloped with her, the former Countess Tolstoy, I believe, and they lived the rest of their lives together, in seclusion even after his books started selling, so abandonment was not apparently a repetitive behavior with him.
Note, by the way, that Maturin does not seem to suffer any lasting ill effects from drug usage, nor is he a heavy user, except when some outside matter of grave concern weighs on him, for example when rejected by Diana. He seems to use laudanum as an escape from dire emotional trauma, not as a constant companion (though at one point he clearly underestimates the effects of coca leaves and becomes habituated, eventually he comes to realize he is overusing them and seems to be able to just give them up when he wants to.)
It’s conventional to read about drug users in literature who eventually destroy themselves, and it’s likely that a real-life Maturin, if such a thing is conceivable, would have faced more problems later in life, but on the other hand there are plenty of people who handle serious drug habits for many years without any terrible effects on their lives. It seems that most serious drug users do eventually lose control, but it may take decades before that happens, and Maturin is only middle-aged by the time the series has come to a premature end.
*No, he never worked on EQ or SWG.