Attorney General Jeff Sessions is investigating up to $6 billion in legal settlement money that the Obama administration steered toward progressive causes and allies in left-wing advocacy groups.

A memo sent to US attorneys on July 28, published Friday by Breitbart news, ordered a review of a decade’s worth of payouts that Congressional Republicans have called a political slush fund.

Former Attorneys General Eric Holder and Loretta Lynch regularly arranged for major corporations to make large “donations” to left-leaning groups like UnidosUS — formerly the National Council of La Raza — and NeighborWorks America during settlement negotiations to end banking, environmental, civil-rights, and other federal lawsuits.

The groups getting the money were not victims in the cases or parties to the lawsuits, and Republicans say they had no proper claim to the cash.

That means that all punitive damages awarded in the cases should have gone directly into the US Treasury, say Republicans on the House Judiciary Committee who probed the scheme in 2015.

Instead, $3 billion of the multi-billion-dollar 2013 agreements with Citigroup and Bank of America to settle cases related to mortgage-backed securities went to community-organizing groups.

The $17 billion Bank of America deal gave the bank “extra credit” if it donated $100 million or more to activist groups approved by the Department of Housing and Urban Development.

The list included UnidosUS, which advocates for illegal immigrants; the National Community Reinvestment Coalition, a left-leaning housing lobbyist group; Operation Hope, which pushes banks to lend to unqualified mortgage applicants in Los Angeles; and the Mutual Housing Association of New York, a spinoff of the controversial community-organizing group ACORN.

Volkswagen was forced to spend $2 billion to promote and develop zero-emission vehicles as part of a 2016 settlement.

Third-party donations have been included in federal settlements since the 1970s.

But the Obama administration ramped up the practice as an end-run around the Republican-controlled House, which slashed federal funding for politically connected “housing counseling” organizations in 2011.

Sessions ordered a stop to the strategy in June.

“Settlement funds should go first to the victims and then to the American people — not to . . . the political friends of whoever is in power,” Sessions said at the time.

The investigation will be the first tally of the cash that ended up in the hands of left-wing special interests — and signals a new willingness on Sessions’ part to scrutinize Obama administration activities.

The attorney general’s inaction on that front has angered the president in recent weeks.

“Attorney General Jeff Sessions has taken a VERY weak position on Hillary Clinton crimes (where are E-mails & DNC server) & Intel leakers!” Trump tweeted on July 25.

Sessions vowed to chase down government leakers — and to pressure reporters to give up their sources — in a Friday press conference on the problem that has bedeviled his boss since his inauguration.

A Department of Justice spokesman did not respond to a request for comment.