A Queens Catholic-school teacher says he was fired for breaking a previously unknown 11th commandment — thou shalt not appear too ladylike in class!

Mark Krolikowski claims he was branded as “worse than gay” and relieved of his responsibilities after he admitted to school officials two years ago that he was transgender, according to a new lawsuit.

Krolikowski says that — despite years of accolades from his supervisors at St. Francis Preparatory School in Fresh Meadows — he started being treated like a pariah after a parent became suspicious of his long hair and fancy nails and went to school bosses with her concerns in fall of 2011.

Krolikowski had worked at the school for 32 years, racking up such accomplishments as co-directing the school’s chamber orchestra when students performed for Pope Benedict XVI and other dignitaries in a hangar at JFK Airport in 2008.

About five years ago he started feminizing his look in class, wearing his hair in a shoulder-length woman’s style and accessorizing his suit-and-tie wardrobe with a French manicure and multiple hooped earrings, court papers show.

But a parent took issue with his look and reportedly went to school officials. The subsequent questions from his bosses forced Krolikowski to tell then-Principal Leonard Conway and assistant principal Patrick McLaughlin he was transgender, court papers state.

The revelations came as such a shock, the school leaders allegedly forgot the golden rule and bashed Krolikowski as “worse than gay” and banned him from appearing at public events, court papers show.

After agreeing to tone down his appearance by losing the earrings and feminine nails, Krolikowski said he got stellar evaluations during the 2011-12 school year. Despite this, Krolikowski claims his bosses called him insubordinate in June 2012 for allegedly continuing to go “his own way,” according to court papers

He says they demanded his resignation and terminated him in August.

“We’ve been trying to resolve this case out of court for months, but they refused to do so,” Krolikowski, of Bellport, LI, told The Post. “They’ve forced us to file.”

A lawyer for St. Francis Prep — which is not affiliated with the Roman Catholic archdiocese — said the school “completely” denies the allegations.

“He was terminated for appropriate reasons,” said the lawyer, Phil Semprevivo.

Ironically, Krolikowski taught a class called “Human Sexuality and Love” in 2011-12, which included lessons on sexual orientation, court papers said.

Krolikowski is seeking unspecified damages for the emotional distress and economic loss.