A Bronx man living in North Carolina pleaded not guilty Friday in the death of a 2-year-old boy shot and killed by a stray bullet in the Bronx on Easter in 2006.

Darryl Hemphill, 34 years old, was indicted at Bronx Supreme Court on second-degree murder charges in the death of David Pacheco Jr.

Police arrested Mr. Hemphill Tuesday at the Cary, N.C., home he shares with his wife and two children after investigators discovered new DNA evidence linking him to the crime, prosecutors said.

The boy had been strapped into a car seat behind his mother, Joanne Sanabria-Pacheco, when a stray bullet pierced the rear door and struck him in the chest in the Morris Heights section of the Bronx.

Authorities originally charged Nicholas Morris, a friend of Mr. Hemphill's, with the death, but the case ended with the judge declaring a mistrial in 2008.

Police later obtained a 2011 warrant to get Mr. Hemphill's DNA, prosecutors said. They now charge that moments before the gunfire, Mr. Hemphill—wearing a bright blue sweater—had been in a fistfight a block away from the shooting scene.

"That man in the sweater—Mr. Hemphill—came back to the scene with a firearm," said Assistant District Attorney Adam Oustatcher. "At the moment he fired the gun, Mrs. Sanabria [Pacheco]'s car was passing the intersection."

The prosecutor went on to charge that Mr. Hemphill then fled the scene and discarded the sweater at the home of an unnamed co-conspirator, before fleeing first to Brooklyn and then North Carolina. Authorities have the sweater and said Mr. Hemphill's DNA was found on it.

Eric Sears, Mr. Hemphill's attorney, used the district attorney's failed prosecution of Mr. Morris to question their new narrative. "I have no real reason to think that the district attorney's judgment in this case is any better now," he told the court. His client was remanded.

The killing led the victim's mother to embark on a campaign for gun restrictions. She sat in court visibly distressed Friday.

"Nothing's ever going to bring him back. My pain never goes away—it's 24 hours, 365 days of the year," Mrs. Sanabria-Pacheco told reporters through tears outside court.