NYPD Commissioner Bill Bratton is using a nonprofit that funds crucial police programs to dole out cushy consulting jobs to cronies — and springboard them onto the public payroll, The Post has learned.

Since Mayor Bill de Blasio appointed Bratton to his second stint as the city’s top cop last year, the New York City Police Foundation has awarded more than $2 million worth of outside contracts to study the NYPD and recommend improvements, sources said.

The consultants include at least six Bratton associates with ties going back as far as his time with the Boston Police Department in the 1970s.

Approved contract proposals reviewed by The Post included pay rates up to $250 an hour, plus transportation, hotel and other expenses for the consultants, whose hometowns range from Martha’s Vineyard, Mass., to Redondo Beach, Calif.

Former NYPD officials accuse Bratton of using the foundation as a “piggy bank” to enrich his pals and create “almost a shadow government” inside 1 Police Plaza.

“Within the NYPD, there are multiple, high-level, experienced police managers that are more than qualified to identify, draft and implement these policies that affect everyday New Yorkers on a daily basis,” one source said.

The money has also flowed both ways, with Bratton splitting two contracts — worth more than $500,000 combined — with one consultant in 2013.

The contracts with the cities of Oakland, Calif., and Baltimore were secured through a company run by Robert Wasserman, who has known Bratton since the ’70s.

Baltimore City Councilman Brandon Scott tried to block the pair’s $285,000 deal to create a “strategic plan” for cops in his city, saying it “raised a red flag.”

“My concern was that this friends-paying-friends business, it was like a good-ol’-boy network,” Scott said.

“It just seems like a team of folks, where one of their friends gets a job and the others capitalize on that opportunity and come in and receive their contracts.”

The New York City Police Foundation, created in 1971, bankrolls NYPD initiatives such as stationing anti-terror cops abroad in a program started by Bratton’s predecessor, Ray Kelly.

Letters written by Bratton show he urged the foundation to dole out the cash for his old pals.

And foundation records show that Bratton has raised money to pay for the contracts by rubbing shoulders with titans of real estate and finance.

One spreadsheet credits him with generating more than $2.6 million in donations between January 2014 and July 2014.

The contracts Bratton helped secure were intended to help consultants land full-time jobs or deals with the city, according to emails from foundation staff that sources shared with The Post.

One consultant who landed a job is Michael Julian, whom Bratton appointed in November to be the NYPD’s $199,000-a-year deputy commissioner for training.

But Julian lost the role just two months later after becoming a laughingstock for suggesting cops chew on mints to avoid cursing and squirt baby oil on protesters, sources have said.

Foundation emails described another consultant, former Los Angeles police official Gerry Chaleff, as a “success story” after he was awarded a $24,000 contract last year to review the NYPD’s “audit functions.”

“Following the Foundation’s model for incubating new NYPD programs, the city recently hired Chaleff as a full-time employee,” read a July 24 email.

Referring to other consultants hired by the foundation, the email noted, “We expect similar long-term results from our investment in John Linder, George Kelling and Bob Wasserman as the Department hopes to have them absorbed into the city budget by the end of the year.”

The foundation continued to pay Wasserman at Bratton’s request, said its chair, Dale Hemmerdinger.

Sources said Wasserman works out of an office in NYPD headquarters on the same floor as Bratton and exerts influence over hiring, firing and promotions “and tells people what to do.”

Wasserman even introduces himself as Bratton’s “chief of staff,” sources said, even though that title is held by 30-year NYPD veteran Kevin Ward.

A sixth consultant, former LAPD risk manager Beth Corriea, won a $24,000 contract with a proposal that said, “Subsequent work (design and implementation) will take place under city contract.”

Corriea also got another contract worth $68,000.

The New York City Police Foundation refused to discuss its hiring of consultants at Bratton’s request, with a spokesman saying only that it “continues to invest in the NYPD by contracting experts.”

But the practice has stirred dissent among board members and spurred the resignation of longtime trustee Valerie Salembier in October, sources said.

She declined to comment.

Bratton rep Stephen Davis defended his use of consultants.

“The NYPD is currently undergoing some of the most radical changes in its history. To do so without direct input from experienced people in the different aspects of policing would be a mistake,” he said.

“These consultants provide valuable advice and recommendations in many areas of the NYPD. However, they do not set policy. That is done only by the police commissioner and the senior executive staff of the department.”