A Bronx man who spent 19 years behind bars for a crime he didn’t commit has filed a $120 million lawsuit — citing an NYPD officer’s memoir to prove cops didn’t play by the book.

Anthony Ortiz, 41, claims corruption described by retired Detective Michael Codella in his 2011 tell-all, “Alphaville: 1988, Crime, Punishment, and the Battle for New York City’s Lower East Side,” proves cops were out of control when he and Danny Colon, now 48, were convicted in a 1989 drug-related shooting that left two dead and two injured.

“As he wrote in his book ‘Alphaville,’ Codella would illegally search and beat up suspects, plant evidence on them, coerce false confessions from them, take money from them, and lie about it to judges, prosecutors, defense lawyers and Internal Affairs investigators,” reads the suit filed in Bronx Civil Court.

Ortiz and Colon were released in 2009 after their convictions were overturned by the Court of Appeals, which determined the Manhattan DA’s Office, along with cops, withheld evidence that exonerated the men. The DA refused to retry the case, citing a lack of evidence.

Ortiz is not mentioned in the book, which details how Codella helped clean up the neighborhood’s crime-ridden streets.

Codella told The Post he wasn’t involved in Ortiz’s case and never stole cash or planted evidence.

“It is also obvious, based on the total mischaracterization of my book, that the person who drafted this lawsuit never read ‘Alphaville: 1988,’ ’’ he said.

The Law Department is reviewing the suit, which names the city, the Housing Authority, which then had its own police force, and six other cops.