Michael Cohen owed $22 million in loans against the taxi medallions he owned — and allegedly lied in order to try to clear the massive debt, according to court documents unsealed Tuesday.

The extent of the financial woes racked up by President Trump’s former personal attorney and fixer emerged in just-unsealed filings related to search warrants in special counsel Robert Mueller’s investigation.

The documents show that federal prosecutors in Manhattan and the FBI were zeroing in on Cohen’s taxi businesses — including “misrepresentations” and omissions he made “in connection with a transaction intended to relieve Cohen” of the $22 million debt.

The investigation, which began in July 2017, found that Cohen lied about income from consulting work in 2017 in order to avoid paying back loans and failed to disclose “tens of thousands of dollars” he received in other monthly income.

“By making these misrepresentations and material omissions, Cohen avoided making monthly payments on his loans, and attempted to fraudulently induce the banks to relieve him of certain repayment obligations and personal guarantees that Cohen and his wife had signed,” the papers said.

It had been previously reported that Cohen was in the hole from borrowing cash from banks and credit unions against the medallions.

The once-rare taxi medallions — which at their peak were worth as much as $1.2 million apiece — tanked to just an average of $200,000 each after ride-share services like Uber and Lyft exploded in the city.

Cohen has pleaded guilty to tax fraud and campaign finance violations, as well as to lying to Congress.

He’ll begin serving a three-year sentence in May.