A married Queens cop killed himself after his female boss enticed him to trade sex for a favorable work schedule, then refused to let him break off the tryst, a new lawsuit claims.

Officer Matthew Schindler tried to end the affair with his sergeant last year — the day before Valentine’s Day — then shot himself in the head when she wouldn’t let him go, according to the lawsuit filed in Queens Supreme Court by the cop’s widow, Gina.

According to the suit, Schindler’s career depended on his “submission to the sexual advances” of his married supervisor, Sgt. Christine Hirtzel, who had control over his work schedule and “day-to-day conditions of [his] employment.”

The two allegedly had “sexual relations” while he was assigned to the 115th Precinct — and the married father of three small children “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 [Hirtzel],” according to the suit.

Schindler tried to end the tryst on Feb. 13 — telling Hirtzel that he was depressed and felt guilty about cheating on his wife, the suit says, adding that he found his boss’ repeated advances to be “offensive.”

He even told Hirtzel that he would kill himself if the advances didn’t stop, the suit says.

But the frisky sergeant refused — and then let the suicidal cop leave the station house with his service weapon, the documents allege.

Hirtzel told her supervisor about the suicide threat, and confessed to the relationship, according to the suit.

During this time, the sergeant asked officers to monitor Schindler’s movements by tracking his cellphone, sources said.

Hirtzel and the precinct captain then called Schindler and tried to convince him not to kill himself.

Later that day, the 14-year veteran called Hirtzel, saying he wouldn’t be around anymore, then placed the barrel of his service weapon under his chin and killed himself on the side of the Long Island Expressway.

The alleged affair was a poorly kept secret in the Jackson Heights station house, multiple law-enforcement sources said.

“Everyone assumed it. The feeling was that they were having an affair,” said one source.

And when Schindler died, his alleged paramour was briefly stripped of her guns and given a medical evaluation.

Hirtzel’s husband declined to comment at their Long Island home.

Gina Schindler also declined to comment when reached by phone.

“Her family is going through a lot,” said her lawyer, Kenneth Ready.

The NYPD did not immediately respond to a request for comment, and a spokesman for the city’s Law Department declined to comment.

After hearing news of the suit, Hirtzel “busted out of the precinct,” a law-enforcement source said. “She just took off. Nobody knows where she went.”

Additional reporting by Larry Celona and Kenneth Garger