Apparently haunted by his secret, once-promising rapper G. Dep walked into a police precinct to confess to the shooting, authorities said. The rapper is being held without bail after surprised investigators matched the details he provided to the unsolved slaying of John Henkel. Initially charged with murder, he was indicted Tuesday on a charge that won’t be disclosed until a court date next month.

For the 36-year-old G. Dep, the case marks a nadir in his long fall from rapper on the rise. After scoring a couple of hits in the early 2000s, he has been mired in drug and legal problems in recent years, though he was attempting a comeback with an album released online this year.

But the shooting case also represents his determination to turn a troubled life around, his lawyer said Tuesday.

“He’s trying to remake his life,” attorney Michael Alperstein said. Guided by a substance-treatment program, “he was making amends,” Alperstein said.

The bearded rapper said nothing during a brief appearance Tuesday in a Manhattan court, looking back at about a dozen relatives and supporters as he was led away. They declined to comment afterward.

Henkel was shot in the chest three times outside an East Harlem apartment complex early on Oct. 19, 1993, well before G. Dep’s brief heyday. The rapper told a detective last week he pulled a .40-caliber handgun to rob the victim and fired when he resisted.

At the time of the shooting, “I didn’t think about it” – or even realize the man had died until investigators told him so last week, the rapper told the New York Post in a jail interview published Sunday.

But, he said, the shooting ate away at him over the years.

“I started to wonder if all the bad things that happened to me in my life were karma for what I did. … You start to think, ‘My happiness is because of someone else’s sadness,'” he told the newspaper. “I thought that if I turned myself in, it might give me closure.”

G. Dep, born Trevell Coleman, was one of the rising stars of hip-hop impresario Sean “Diddy” Combs’ Bad Boy Records label in the late 1990s and early 2000s.

G. Dep had hits with “Special Delivery” and “Let’s Get It,” the second of which featured Diddy and Black Rob. G. Dep’s videos helped popularize a loose-limbed dance called the Harlem shake, which made the rounds among clubgoers in the early 2000s.

But the Harlem-based rapper’s career slumped after his 2001 debut album, Child of the Ghetto.

He ran through his money and got entangled with drugs, he told the Daily News of New York in 2007, fresh from three weeks in jail after an arrest on charges stemming from a dispute with a cell-phone salesman.

It was one of at least a dozen arrests on drug, disorderly conduct and other charges since the 1990s. He pleaded guilty to trespassing as recently as last month and was sentenced to 20 days in jail, records show.

Still, G. Dep has been trying to revive his career. He digitally released a new album, Ghetto Legend, this year with a new label, Famous Records. Based in Coral Springs, Fla., it focuses on releasing music online.

CEO Jeffrey Collins said the rapper never mentioned the shooting but was frank about his other problems when they began working together about six months ago.

“He told me he was now clean,” Collins said. “He wants a clean start.”