An obese judge did not do his $193,000-a-year job for over three years because he was too fat — and will still retire with a hefty pension even though an ethics panel found he milked the system, The Post has learned.

Acting Supreme Court Judge Daniel J. McCullough, 65, stepped down last month, after a state ethics probe determined that he “persistently failed to report to work” since April 2014 instead of going on proper medical leave.

Had he taken such leave, McCullough would also have taken a pay cut. His decision to remain an “active” judge prompted the state Commission on Judicial Conduct to find last month that McCullough failed “to respect and comply with the law.”

“He was basically forced out,” a court source said.

Despite being pressured to leave, McCullough will take home a $143,000-a-year pension.

McCullough — who neighbors say weighs some 300 pounds — suffers a host of maladies, from morbid obesity to herniated disks in his lower back and intestinal bleeding, according to commission records.

He earned full pay even though other judges were forced to pick up the slack in his absence.

In December 2014, about eight months after he first stopped working, a judge ordered McCullough to undergo a medical exam to find out how bad his problems were.

The tests revealed that the Corona, Queens, resident, who had been on the bench since he was appointed by then-Gov. David Paterson in 2010, had “a complicated medical history which involves morbid obesity,” in addition to the other problems.

In November 2015 the chief judge ordered McCullough to undergo a second medical exam, but he ignored the order, according to the report.

He was in a Long Island rehab facility at the time and vowed to return to the bench.

McCullough, a former officer with the city’s Department of Correction, learned in October 2016 that the Commission on Judicial Conduct had started investigating his absences.

On May 4, the commission found that McCullough failed “to act in a manner that promotes public confidence in the integrity and impartiality of the judiciary.”

The next day, McCullough filed for his retirement.

On Monday the commission announced McCullough’s resignation, effective May 29.

“By any reasonable standard . . . three years is too long for a judge to be out of work . . . while others absorb his caseload,” said commission administrator Robert H. Tembeckjian.

McCullough escaped punishment aside from agreeing to stay off the bench.

​McCullough’s attorney, Roger Adler, said his client is still recovering from a 2016 surgical operation, never contemplated going on disability leave — and nor did the administrative judges suggest that option.

“It’s a tragic situation,” Adler said.

“He really hoped to come back.”

Additional reporting by Lorena Mongelli