William Lopez, who was convicted of murder in Brooklyn and imprisoned for 23 years before being exonerated last year, died on Sept. 20 in the Bronx. He was 55.

He had suffered an asthma attack and died at Jacobi Medical Center, his wife, Alice Lopez, said. He lived in the Bronx.

In 1989, Mr. Lopez was convicted of shooting a drug dealer in a crack house in Brighton Beach, Brooklyn, with a shotgun. No weapon or forensic evidence was found at the scene, and prosecutors relied on the testimony of two witnesses.

One witness, a crack courier, testified that the gunman was a “tall, dark, black man,” about 6 feet 3 inches tall. Mr. Lopez was more than half a foot shorter and had light skin. When asked to look around the courtroom and identify the gunman, the witness said she did not see him, though Mr. Lopez was sitting at the defense table.

The other witness had been bingeing on crack cocaine just before the murder occurred. She later recanted her testimony, revealing that she had discussed a deal with the prosecution under which she would testify in exchange for a reduced sentence on a drug charge.

The conviction was overturned in 2013 by Judge Nicholas G. Garaufis in Federal District Court in Brooklyn. In his ruling, he said that the Brooklyn district attorney’s office had been “overzealous and deceitful,” that Mr. Lopez’s lawyers had been “indolent and ill prepared,” and that the ruling of the original judge was “incomprehensible.”

Mr. Lopez was born on Jan. 18, 1959, in Brooklyn. He and his wife married in 1993. She survives him, as do his mother, Lydia; a brother, Eugene; a daughter, Crystal; and three grandchildren.

Throughout his incarceration, Mr. Lopez maintained his innocence. In 2012 he contacted Jeffrey Deskovic, an advocate for the wrongfully imprisoned, and Mr. Deskovic’s foundation began investigating his case. (Mr. Deskovic had been exonerated after serving time for rape and murder.)

“It had serious problems, as many trials do,” Charles J. Hynes, the Brooklyn district attorney, told The New York Times in 2013. Mr. Hynes nevertheless filed a brief to overturn Judge Garaufis’s decision. The brief was withdrawn by his successor, Kenneth P. Thompson, who defeated Mr. Hynes in his bid for re-election.

“It feels great to be back on Earth,” Mr. Lopez said after his release. “I’m looking forward to restoring my life as best as I can.”

At his death, Mr. Lopez was preparing a lawsuit against the district attorney’s office.