The King of Pop was a world-class pauper when he died — he was $500 million in debt.

That didn’t stop him from living large — he was staying in a $100,000-a-month rental when he died, and had been taking out loans on some of his biggest assets, including the catalog of Beatles songs he had snapped up from Paul McCartney in the late 1980s.

Once one of the world’s richest entertainers, Jackson dug himself into a deep financial hole with a combination of reckless spending and massive legal problems at a time when his record sales were plummeting.

In 2005, an accountant said Jackson was spending $20 million to $30 million more a year than he was taking in.

That mountain of debt forced him out of his amusement park-style home, Neverland Ranch, and left its contents on the auction block earlier this year.

Neverland became notorious amid allegations that Jackson molested young boys he had hosted for sleepovers there. He paid the family of one boy a reported $23 million.

He also was accused of molesting a boy there in 2003, when this police mug shot was taken. He was acquitted.

His cash depleted after the trial, Jackson went to live in Bahrain as the guest of Sheik Abdullah, who later sued him for $7 million, charging that the singer backed out of a business deal.

It’s unclear how much will be left in his estate. Jackson had planned a series of comeback concerts, slated to begin in London next month, to replenish his cash flow, and the London Mirror reported that he left the Beatles catalog to McCartney to make amends.