The Brooklyn district attorney’s office, which revisited Mr. Hamilton’s case through its Conviction Review Unit, said that medical and scientific evidence, like the path of the bullets and where the victim’s bleeding occurred, undercut the sole eyewitness’s testimony and that the eyewitness was not credible.

Mr. Hamilton, 49, who was paroled in 2011, was one of the first to notice that there were troubling similarities in convictions involving a former police detective, Louis Scarcella. Mr. Hamilton discovered that Mr. Scarcella would often use the same eyewitness and produce confessions that defendants said were coerced or false.

Mr. Hamilton was just out of prison for manslaughter in 1991 when he was charged with shooting a man, Nathaniel Cash, in Bedford-Stuyvesant. Jewel Smith, Mr. Cash’s girlfriend, claimed she was the lone eyewitness to the shooting, but her version of what happened was inconsistent.

She told the first detective who interviewed her that she had not seen the shooting. But according to Mr. Scarcella, who interviewed her later, Ms. Smith said she had seen the murder and implicated Mr. Hamilton. In a post-trial hearing, Ms. Smith said she had been pressured by Mr. Scarcella to name Mr. Hamilton as the killer, according to a defense filing.

The Conviction Review Unit revisited the crime scene and interviewed Ms. Smith in North Carolina, and found she was “unreliable, incredible and for the most part untruthful,” a prosecutor, Mark Hale, said in court. “They had to depend upon her credibility to convict Mr. Hamilton,” and as a result, “his due process rights were violated.”