The NYPD is investigating its sex-crimes unit, which inspired the long-running TV series “Law & Order: SVU” but has been repeatedly rocked by scandal in recent months, law-enforcement sources told The Post on Tuesday.

The Internal Affairs Bureau seized log books dating to January 2018 from three Special Victims Division offices, including those of the DNA Cold Case Squad in The Bronx, which was raided on Friday, sources said.

SVD headquarters and the offices of the Manhattan Special Victims Squad were also targeted, sources said.

The probe is being conducted by IAB’s “Group 1”, which investigates suspected misconduct by NYPD officials holding the rank of captain or above, sources said.

Several SVD cops are being scrutinized by IAB, sources said.

“I don’t know what they have, but it’s not good,” a source said.

The revelation of the internal investigation followed a meeting at which several advocates for sex-crimes victims complained to NYPD Commissioner James O’Neill about how the SVD was handling its cases, sources said.

An NYPD spokeswoman confirmed the IAB probe but said it had nothing to with the SVD’s official duties.

“Internal Affairs is investigating allegations of isolated incidents of both the misuse of time and a department vehicle within the Special Victims Division,” spokeswoman Devora Kaye said.

“The internal review does not pertain to the Special Victims Division’s day-to-day investigative work or any particular sex crime cases it is investigating.”

The probe was first reported by the Daily Beast.

SVD’s DNA Cold Case Squad developed the evidence that led to the blockbuster arrest of disgraced movie mogul Harvey Weinstein, who’s awaiting trial next year in a pair of alleged sex assaults in Manhattan in 2006 and 2013.

But allegations of wrongdoing by one SVD detective led to his ouster as lead investigator on the Weinstein case.

SVD Det. Nicholas DiGaudio was accused of telling one Weinstein accuser to delete information from her cellphones, which she didn’t do, and of withholding damaging evidence about another accuser, which led prosecutors to dismiss a sex-assault charge and drop her from the case.

SVD was also the subject of a scathing, March 2018 report by the Department of Investigation, which said the unit was too understaffed and poorly trained to properly handle its caseload.

The controversies led to a November shake-up that ousted Deputy Chief Michael Osgood as SVD commander and transferred him to Staten Island, leading the veteran cop to retire a week later.