The Bernie Madoff son who committed suicide last month trusted his con-man dad with everything he had, court papers show.

In his will, Mark Madoff named his flimflam father as a co-executor of his estate — a position the Ponzi schemer has to leave vacant since he’s serving a 150-year prison sentence for the biggest investment fraud in US history.

Madoff’s will was signed Nov. 1, 2007 — a little over a year before it was revealed that his father was a world-class con artist who’d duped his investors out of billions of dollars in a decades-long scheme.

Madoff, 46, never amended his will after his father’s downfall, and hanged himself in his SoHo apartment on Dec. 11 — the second anniversary of his dad’s arrest.

Mark and Andrew had made millions working for their father through the years but brought his schemes to an end by turning him in after he confessed their success was “one big lie.”

It’s unclear how much Mark’s estate is currently worth. The Manhattan Surrogate’s Court filings put its value as worth over $500,000, although it’s believed to be worth substantially more.

The tormented son left nearly everything to his wife, Stephanie.

He also left her his share of the multimillion-dollar Mercer Street condo where he hanged himself as his 2-year-old son was sleeping in the next room. Stephanie was on vacation in Florida with their 4-year-old daughter, Audrey, at the time.

The will calls for trust funds to be set up for Audrey and Mark’s two other children from a previous marriage, but doesn’t establish one for 2-year-old Nicholas because it was written before he was born.

It advises his trustee to use the funds to pay for the kids’ “health, education, support and maintenance,” and then pay the children the remainder of the principal by the time they turn 35.