A Queens cop killed himself last year because his female boss made him trade sex for a favorable work schedule, his wife claims in a bombshell lawsuit.

Gina Schindler claims her late husband, Officer Matthew Schindler, was forced to have sex with his supervisor, Sgt. Christine Hertzel, to determine his workload and schedule.

Schindler, 39, “was made to understand that he would suffer tangible detriment in his job, job assignments, work conditions and future prospects if he did not submit to the sexual advances and demands of Hertzel,” according to the lawsuit filed in Queens Supreme Court.

The widow claims in the lawsuit that her husband and Hertzel had “sexual relations” during his time at the 115th precinct in Jackson Heights — from March 2011 until his death on Feb 13, 2012.

Schindler “realized and/or believed he could not escape the continuing sexual advances and demands of Hertzel,” the lawsuit said.

On Feb. 13, the 15-year veteran told Hertzel he would kill himself over the “guilt” and asked for the affair to stop, the suit says.

She allegedly refused.

Hertzel told her captain about their relationship and Schindler’s suicide threat, the suit says.

The captain allegedly tried to call Schindler to “rectify his hostile work environment and persuade him against suicide,” the lawsuit said.

But the father of three killed himself with his NYPD service pistol that same day.

Schindler’s wife is suing the city, the NYPD and Hertzel for violating her husband’s civil rights.

A spokeswoman for the City Law Department declined to comment. Schindler’s attorney didn’t immediately comment.