The practice of disrespecting rivals in rap is well established; the same with rappers claiming to be “the worst guy in the neighborhood,” Bridget G. Brennan, the special narcotics prosecutor for New York City, said. “That’s been around forever.”

“But there’s now a much bigger audience — it’s not just that the whole neighborhood knows about the dispute,” she added. “You can get tens of thousands of hits on a YouTube video. It’s a much bigger arena.”

Indeed, Mr. Holder’s rap video about Mr. Haywood has been viewed more than 100,000 times.

Ms. Holder said her son began to resent Mr. Haywood, a longtime friend, after her son was twice arrested on gun possession charges for weapons that he claimed belonged to Mr. Haywood. “Every time Quaysean shows up with a gun, my son gets in trouble,” she said.

Standing under the elevated train along Saratoga Avenue one fall afternoon, Mr. Nelson said he had spent tens of thousands of dollars on bail and lawyers’ fees after he was arrested, money he would have spent on studio time. He is not accused of taking part in the shootings but rather of being a member of the surrounding conspiracy, a felony charge that he disputes.

“I’m not in any gang,” he said. “We have copyrights for our organization; we are a music group. O.T.S. Entertainment. A.T.C. Entertainment. This is a music group, you dig?”

But, he acknowledged, “I can’t say that everybody is living the straight and narrow life.”

In November, Mr. Nelson was rearrested and indicted on new conspiracy charges related to the shooting of a grand jury witness in late 2012; prosecutors said that more than three months before the shooting, he and two A.T.C. members had possessed a loaded gun in a cab. His manager, Mr. Allen, said the police arrested Mr. Nelson outside a Brooklyn club just before he was to perform there. “We were walking in and they rushed him,” Mr. Allen said. Mr. Nelson is currently in jail.

“A lot of people still out in these streets,” he said before his arrest. “But if they do a crime, you can’t make that fall back on the one that’s trying to make it out of the hood. If they lock us up, who’s going to get us out of the hood?”