A Queens principal who was busted years ago for graduating failing kids via bogus online classes has finally been ousted — after he was accused of turning a blind eye to an assistant principal allegedly bedding teachers.

Hillcrest HS principal David Morrison recently sent an email to colleagues announcing that his gig is over at the end of August, The Post has learned.

“On Tuesday, the Superintendent informed me that he will be making the decision to discontinue my probation on August 20, 2019,” the message reads.

Morrison was still on a standard probationary period for new principals after gaining the job in 2014.

He didn’t give a reason for being shown the door, nor did the Department of Education — but his tenure had been plagued by scandal.

As first reported by The Post in 2016, school whistleblowers accused Morrison of embellishing graduation rates by allowing 172 kids to amass credits through phantom online classes.

The DOE confirmed Wednesday that those charges were eventually substantiated — but he only received a “counseling letter.”

Then last year, Morrison was named in a $10 million federal lawsuit that accused assistant principal John Binet of rewarding staffers who slept with him.

The DOE said Wednesday it did not substantiate those claims against Binet, although the lawsuit is still pending.

Binet, a friend of Morrison’s, allegedly gave his conquests favorable working conditions and penalized those who resisted his advances, according to the suit.

“There are at least four female faculty members, whose names are known to the plaintiffs, who have all received benefits from their sexual exchanges with Binet,” the suit reads.

There were at least five formal complaints lodged against both men with the teachers’ union and DOE, but no tangible action was taken, according to court papers.

The suit argues Morrison knew about Binet’s alleged behavior but let it slide because they were pals.

Co-complainant Caroline Shin, who is still a teacher at the school, claimed she was targeted for retribution by both men because she complained about Binet.

In the email announcing his departure, Morrison told staffers he had been at Hillcrest “long enough to know” that news of his ouster would be “circulated throughout the community.”

“I would appreciate it if you can all work not to ‘fuel the fire,’ ” he wrote.

Morrison declined to comment. Binet couldn’t immediately be reached.

Binet is still an assistant principal at Hillcrest, the DOE said.

Additional reporting by Alex Taylor