A slain Brooklyn slumlord’s shady business practices helped sink a bank that counted President Obama as a customer and ex-Chicago Bears quarterback Jim McMahon as a member of its board, The Post has learned.

Two unpaid loans to murder victim Menachem “Max” Stark and his business partner Israel “Sam” Perlmutter were among 17 bad bets that spelled $104 million in losses for Chicago’s Broadway Bank before it was shut down by the feds in 2010, court papers show.

The loans included $1.5 million Broadway gave Stark and Perlmutter in December 2007 through their Southside House LLC business “to provide working capital for the borrowers’ New York-based real-estate business,” according to a 2012 suit filed by the Federal Deposit Insurance Corp.

The one-year, interest-only loan was secured by a second mortgage on a 74-unit apartment building in Williamsburg that Stark and Perlmutter bought for $29 million earlier in 2007, the Chicago federal court filing says.

But Broadway lost any chance of getting repaid when Stark and Perlmutter “defaulted on the first mortgage,” the suit says.

Stark and Perlmutter also borrowed $6.2 million in construction money from Broadway in February 2007 to develop The Bedford Lofts in South Williamsburg, even though financial statements revealed “they were highly illiquid and unable to pay the loan,” the suit says.

Broadway Bank was run by Demetris and George Giannoulias, brothers of former Illinois state Treasurer Alexi Giannoulias.

Alexi is a political pal and basketball buddy of Obama, who backed him in his successful race for treasurer as well as a failed bid for Obama’s old seat in the US Senate.

Alexi, who isn’t named in the suit, served as chief loan officer for Broadway before being elected state treasurer, and questions about his role at the bank — especially loans made to reputed mobsters, including convicted bookmaker Michael “Jaws” Giorango — helped sink his Senate run.

According to the FDIC, Broadway’s outside board members — including McMahon, who last year revealed he’s struggling with the early stages of dementia — “were grossly inattentive to the affairs off the bank, deferring excessively to the whims of the Giannoulias family.”

Stark may have been targeted for a professional hit by one of his many unpaid creditors, source said.

Law-enforcement sources said Sunday that investigators are poring over a smartphone found Friday attached to the bottom of Stark’s car.

They believe it might have been used to track his movements ahead of his deadly Jan. 2 abduction.

Cops are trying to trace the phone’s owner, as well as check it for fingerprints, DNA and other evidence, sources said.