“I was bored,” Mr. Nin recalled. “That’s one of my things. I want to drink more when I’m bored.”

In a bid to fight his impulses, he ordered a nonalcoholic beer for $9. Then he had a second. It seemed foolish, he said, to spend so much money for drinks and not even feel a buzz. When Mr. Nin returned from the casino, he stopped at a bodega and bought two six-packs of Presidente beer. So began his backslide.

“When I started going downhill, I had to have a drink or two just to go to work,” Mr. Nin said.

Before long, he was fired from his valet job. That moment prompted some overdue self-reflection. The ruts he continually found himself in were unacceptable for a man in his 50s, Mr. Nin said.

In March 2016, he entered a five-day detox program, followed by 21 days of rehabilitation. Then he went to Pride Site, a long-term inpatient rehabilitation program in Manhattan that offers addicts a range of support services as they work on their recovery.

There, Mr. Nin learned about the Association of Community Employment Programs, a nonprofit that helps homeless people and ex-convicts get back on their feet. He gave up the room he was renting when he entered rehabilitation. The agency is a partner of Community Service Society, one of the eight organizations supported by The New York Times Neediest Cases Fund.

As he re-evaluated his life, he set his sights on earning a living as an Uber driver. In February, he enrolled in classes at LaGuardia Community College to acquire his license with the city’s Taxi and Limousine Commission. Community Service Society used $31 from the fund to buy Mr. Nin a weekly MetroCard so he could attend those classes.