A businessman whose dealings with the de Blasio administration are already under federal investigation used a middleman to profit from a nearly $6 million city contract for rat-repellent trash bags, The Post has learned.

Joseph Dussich and his Queens-based JAD Corp. of America spent nearly a decade futilely trying to convince the Parks Department to consider using his anti-rodent “Mint-X” garbage bags.

Dussich finally convinced Parks to test them out in spring 2015 as part of a $15,000 no-bid contract with his firm — after donating $100,000 to the Campaign for One New York, which was then the nonprofit fundraising arm for Mayor Bill de Blasio.

That contract is now being scrutinized by federal and state investigators probing the mayor’s fundraising activities, sources have told The Post.

But the probe hasn’t stopped Dussich’s janitorial supply company from inserting itself into a much larger five-year, $5.9 million contract for more of the bags — thanks to a tailor-made city proposal for bids.

A few months after the Parks Department’s trial run of Mint-X, city officials took steps to ensure their agencies were heavily stocked with them for years to come by issuing a request for trash bags that have been officially “registered” with the US Environmental Protection Agency “to ward off rodents.”

Mint-X, its site proclaims, is the “world’s only EPA-registered, rodent-repelling trash bag.”

So when it came to the bidding process, JAD submitted a proposal to sell those bags directly to the city, as well as to provide other trash-can liners. As it turns out, the Mint-X maker lost out to a New Jersey competitor, who submitted a slightly lower bid, records show.

But JAD still came out a big winner. That’s because the competitor, Central Poly Corp., also had an agreement with Dussich to buy his “Mint-X” bags in bulk and resell them to the city.

“It sounds like the bid language was tailor-made to guarantee Dussich’s product would be sold to the city no matter what,” said Geoffrey Croft, of the watchdog group NYC Park Advocates.

“Not everyone has $100,000 to secure a meeting with the mayor and, as a result, be awarded a small fortune in contracts.”

Although Mint-X bags aren’t the only product Central Poly is providing the Department of Citywide Administrative Services through the contract, they represent more than $3 million of the deal, records show.

Dussich’s lawyer, Roland Riopelle, declined to say what his client’s share of the profits is but insisted that the “contract is a not a very profitable one” after costs are factored in.

“There’s no evidence of collusion between Mint-X and Central Poly on this bid,’’ he added. “It was a legitimate bid. The bags work wonderfully, and that’s why the city wants them.”

Dussich spent nearly a decade unsuccessfully lobbying Parks to use the bags, whose non-toxic mint scent is supposed to keep away rats, squirrels and other rodents.

His luck changed after he donated $50,000 in December 2014 and another $50,000 in February 2015 to the Campaign for One New York, which operated outside the campaign finance system, and which the mayor this year disbanded amid scrutiny of its handling.

Ten days after the second donation, Dussich was granted a private sit-down with de Blasio at City Hall, and a month later, JAD was handed the trial contract with the Parks Department.

Sam Biederman, a Parks Department spokesman, said the agency “decided there was enough demand” for the bags following the trial run and now buys them as needed through DCAS.

DCAS, the Mayor’s Office and Central Poly did not return messages seeking comment.

Additional reporting by Yoav Gonen