Former Securities and Exchange Commission general counsel David M. Becker, who indirectly benefited from Bernard Madoff’s epic Ponzi scheme, has agreed to give back his share of the proceeds, a lawyer for Becker said Monday.

Becker and his two brothers, whose mother left behind an investment account with Madoff when she died in 2004, have agreed to pay $556,017 to settle a lawsuit by the trustee overseeing the Madoff bankruptcy.

The trustee had been seeking to recover more than $1.5 million of allegedly fictitious profits from the brothers and their mother’s estate, of which they were executors and beneficiaries.

The brothers “are returning every dollar of Madoff-related money that they received,” said William R. Baker III, a lawyer for David Becker.

To recover more would require reopening the estate, which has been through probate in Massachusetts, and that would have been difficult under Massachusetts law, the trustee said in a court filing Monday.

Madoff is serving a 150-year prison sentence for using money from some investors to make payouts to others as he propped up a financial house of cards that ultimately collapsed.

Trustee Irving H. Picard has been filing lawsuits against so-called “net winners” in the multibillion-dollar fraud — those investors who got more money out of it than they invested — to help compensate the net losers.

The trustee’s December 2010 clawback suit against the Becker brothers led to congressional hearings and an investigation by the SEC inspector general’s office because David Becker had helped shape SEC policy toward Madoff investors.

Becker “participated personally and substantially in particular matters in which he had a personal financial interest,” and “the matters on which he advised could have directly impacted his financial position,” the SEC inspector general concluded in a September report.

The inspector general referred the findings to the Justice Department for potential criminal prosecution, but the department decided not to pursue charges.

Becker said last year in congressional testimony that he did precisely what he was supposed to do. He told the SEC’s ethics office about his mother’s account and got a green light to participate in Madoff-related work at the SEC. He said he also told SEC Chairman Mary L. Schapiro everything he knew about the account just before or after he arrived at the SEC in 2009.

Becker said he did not expect the trustee to sue him, because if there were any fictitious profits in his mother’s account, “all the trustee had to do was notify me and explain his calculations, and I would return any excess funds in my possession.”

According to the inspector general’s report, on at least one of the Madoff-related issues Becker addressed at the SEC, he staked out a position that ran contrary to his personal interest.

The revelation about Becker’s inheritance nonetheless caused a black eye for the SEC chairman, who recruited Becker, allowed him to participate in Madoff-related policymaking, and left other SEC commissioners in the dark about his alleged conflict of interest.

In 2009, the SEC decided not to send Becker to represent the agency at a Madoff-related congressional hearing — an appearance that would have forced a disclosure of the matter. Schapiro testified last year that she supported that decision to avoid diverting attention from the issues under discussion.