Mr. Ayers left behind an account of his addiction. After his death, his mother, Ann Ayers, and brother, Christopher, found a journal he had kept for the last couple of years that chronicled the lies he had told them to conceal his continued dependence on drugs.

“I lie mostly I think because I am scared of being judged for the truth,” Mr. Ayers wrote in May 2015. “This journal is where I tell the truth.” Through the journal, his family would come to know the son and brother they had lost, and see the thoughts of a heroin addict.

Staten Island has been home to a heroin epidemic for several years, and it rivals the Bronx for the highest rate of deaths from heroin overdoses in New York City. The drug arrived to meet demand for opiates and fill the void left by law enforcement crackdowns on prescription pills, which were widely abused there.

Heroin, much cheaper than pills, became the drug of choice for the mostly white, middle-class neighborhoods on the island’s south end. It was brought in bulk from other boroughs and New Jersey, and easily found on the island as an attractive diversion for bored and restless young people — creating a crisis for law enforcement, treatment programs and the parents of addicts, who have seen too many of their children end up in jail or the morgue.

Since 2010, the number of arrests on the island in which heroin or pills were found on the suspect has increased tenfold, to over 1,000 last year. Deaths attributed to heroin overdoses have also risen: In 2012 and 2013, the toll was 33 each year, and then jumped to 41 in 2014.