A high-ranking NYPD cop who was recently named an unindicted co-conspirator in a pending corruption case is about to retire with a tax-free pension, The Post has learned.

Lt. Michael Andreano was granted an accidental-disability retirement by the Police Pension Fund’s Board of Trustees last week despite having been hired following shoulder surgery, law-enforcement sources said Monday.

“It’s fully documented with the job that he came on with a pre-existing shoulder condition. I don’t know how he got it approved,” one source said.

The sweet deal includes a tax-free pension equal to three-quarters of Andreano’s final average salary. Over the past three fiscal years, he’s raked in as much as $157,498 annually, payroll records show.

Andreano was stripped of his badge and gun in 2016 in connection with corruption allegations tied to Brooklyn’s 66th Precinct in Borough Park, where he was in charge of Special Operations.

Last month, federal prosecutors listed him among 10 un-charged participants in an alleged bribery scheme involving ex-NYPD Deputy Inspector James Grant, a former 66th Precinct commander, and Jeremy Reichberg, a former fund-raiser for Mayor de Blasio.

The allegations against Andreano include providing a police escort for an associate of Reichberg’s in September 2014 and responding to Reichberg’s home with another cop “in order to reprimand a neighbor’s contractor.”

Since being assigned to the NYPD’s “rubber-gun squad,” Andreano has spent his work days at the NYPD’s Housing Bureau in The Bronx, where he monitors video feeds from surveillance cameras in housing projects, a source said.