Does he ever learn?

The same election lawyer whose 2014 advice earned Mayor Bill de Blasio a rebuke from the Manhattan district attorney worked for the mayor’s presidential bid that’s now facing scrutiny by federal regulators.

De Blasio followed attorney Laurence Laufer’s counsel about supporting the 2014 state Senate races — in which he skirted caps on donations to individual candidates by funneling money through Democratic county committees.

Manhattan District Attorney Cy Vance Jr. investigated the spending and ultimately declined to bring charges, but warned the mayor about his questionable fundraising methods.

“This conclusion is not an endorsement of the conduct at issue; indeed, the transactions appear contrary to the intent and spirit of the laws that impose candidate contribution limits,” Vance said in 2017.

Laufer also represented The Campaign for One New York, a nonprofit de Blasio started in 2013 to boost his pet policy projects like his universal pre-kindergarten program. CONY was closed in 2016 amid federal and state pay-to-play probes into allegations that the mayor’s team was hitting up donors with business before the city.

Again no charges were filed against the mayor, but a state ethics commission has fined the group’s donors $100,000 for violating a lobbying law.

On Monday, de Blasio blamed unnamed lawyers for giving him the bad advice that led to a Sept. 19 letter from the Federal Election Commission asking why the mayor loaned money from a state political account to his 2020 campaign. The move allowed him to dodge strict federal limits on campaign donations.

“I don’t know exactly which lawyers, but different lawyers that we worked with advised that approach,” the mayor said at an unrelated City Hall press conference Monday.

Jon Paul Lupo, a spokesman for de Blasio’s political fundraising, would not identify the attorney who gave de Blasio the bad guidance, and Laufer did not return messages.

But records show de Blasio’s state political account, NY Fairness PAC, paid Laufer $18,661 in legal fees this year.

“Mayor de Blasio has twice shifted accountability to his lawyers for decisions that stretch the boundaries of campaign finance law,” said Alex Camarda, senior policy adviser to the good government group Reinvent Albany.

“But it is his choice to do what is customary and typical rather than violate the spirit, if not the letter, of the law,” Camarda said.

The de Blasio campaign and a federal version of his NY Fairness PAC also paid the Washington, DC-based firm Trister, Ross, Schadler & Gold $20,719 for legal advice. US Sen. Kirsten Gillibrand (D-NY) used that same firm for her presidential run but did not get caught up in any FEC inquiries. Reps for Trister, Ross, Schadler & Gold did not return a call for comment.

Lupo declined to answer further questions about the federal probe, but said in a statement, “The PACs and the campaign are committed to compliance, and they are properly addressing this and other issues raised with the FEC. The campaign has reimbursed NY Fairness PAC for the payments you asked about.”