A Bronx judge wants to make sure he doesn’t get fired before he can retire.

Longtime Surrogate’s Court judge Lee Holzman, who’s facing mandatory reitrement at the end of the year, gave an impassioned defense to state commissioners who are deciding whether he should be given the boot before then.

“I never, ever intentionally did anything I did not think was in the best interest of the public,” Holzman said.

Prosecutors for the state Commission on Judicial Conduct say Holzman rubber-stamped excessive legal fees by lawyer pal Michael Lippman, and then when he found out he’d been taken improper advances from estates, helped him cover it up.

Holzman, 70, said he did no such thing. He said he demoted Lippman from his post as general counsel to the Bronx Public Administrator’s office, and then set up a system where he’d pay the advances back.

He noted that Lippman’s criminal case has yet to go trial, even though he was indicted two years ago.

“The only one who acted quickly in this whole situation was me,” said the judge, who’s notorious for taking years to make decisions on cases before him.

Commission prosecutor Mark Levine contended he should be removed for “judicial misconduct.”

It’s unclear when the commission will rule. If they side with prosecutors, they’ll make a recommendation for punishment and then send their findings to the state Court of Appeals, which has the power to remove or censure the judge.

The public access to today’s hearing was rare. It was open because Holzman waived confidentiality in the case – making him just the 11th judge to do so in 750 misconduct prosecutions over the past 30 years.