In addition to having a private practice at the time, Mr. Cuban was working for his well-known brother, the businessman Mark Cuban, who threatened to fire Brian if he didn’t get sober. “I kept thinking: ‘I’m not going to rehab. I’m a lawyer, lawyers don’t go to rehab, they aren’t in 12-step programs,’” he said. “Of course, half the people I know in my 12-step program are lawyers.”

Lisa Smith, a lawyer and recovering alcoholic and drug addict, said the only way she was able to perform in her marketing job at the firm Pillsbury Winthrop in the early 2000s was by using cocaine to deal with alcohol withdrawal symptoms. “I was drinking during the day and at night,” said Ms. Smith, now deputy executive director of the law firm Patterson Belknap Webb & Tyler in New York and author of the memoir “Girl Walks Out of a Bar.” “I did coke because it would allow me to straighten up enough to show up to work in the afternoon.”

Professional stress also plays a role, said Dr. Daniel Angres, an associate professor of psychiatry at Northwestern University Feinberg School of Medicine. “Law firms have a culture of keeping things underground, a conspiracy of silence,” he said. “There is a desire not to embarrass people, and as long as they are performing, it’s easier to just avoid it. And there’s a lack of understanding that addiction is a disease.”

That stress became particularly acute as the economy sank after the 2008 financial crisis. Jobs became more scarce. The pressure grew to not take time off from work.

At Peter’s memorial service in 2015 — held in a place he loved, with sweeping views of the Pacific — a young associate from his firm stood up to speak of their friendship and of the bands they sometimes went to see together, only to break down in tears. Quite a few of the lawyers attending the service were bent over their phones, reading and tapping out emails.

Their friend and colleague was dead, and yet they couldn’t stop working long enough to listen to what was being said about him.

Peter himself lived in a state of heavy stress. He obsessed about the competition, about his compensation, about the clients, their demands and his fear of losing them. He loved the intellectual challenge of his work but hated the combative nature of the profession, because it was at odds with his own nature.