Two more high-level aides to New York City Mayor Bill de Blasio are leaving his administration, his office said Thursday, following the announcement a day earlier that his top attorney would quit to chair the watchdog board that investigates police-on-civilian misconduct.

Department of Environmental Protection Commissioner Emily Lloyd is retiring after having taken a monthlong medical leave of absence, the office said. The director of the Mayor’s Office of Sustainability, Nilda Mesa, is departing “to spend time with her family and explore new opportunities.”

On Wednesday, de Blasio’s office said lawyer Maya Wiley, who has directed the mayor’s defense to a series of fundraising probes, would leave July 15. She will become chairwoman of the Civilian Complaint Review Board, the NYPD watchdog, and take a position as “senior vice president for social justice” at the New School, where she’ll teach.

Also this week, the mayor’s social media editor, Scott Kleinberg, took to Facebook to announce he had to leave “for the sake of my health and my sanity.” He added: “I ended up with political hacks plus a boss who just couldn’t get it.”

Wiley’s appointment to the review board rankled the largest police union.

“By appointing a top aide to lead the CCRB, Mayor de Blasio has effectively removed all impartiality from the critical cases involving police officers that come before this so-called ‘independent agency,’ ” Patrolmen’s Benevolent Association President Patrick Lynch said in a statement.

The board’s previous chairman, Richard D. Emery, was forced out in April after referring to the PBA as “squealing like a stuck pig” over his tenure and then using a derogatory term for a woman’s anatomy.

The administration and the mayor’s inner circle have been buffeted by at least five interlocking investigations by city, state and federal agencies into fundraising methods. Wiley was in charge of the administration’s legal strategy.

De Blasio in a statement called Lloyd a “dedicated public servant” who “always had the health of New Yorkers and the environment in mind.”

He commended Mesa for her work in ushering in greener buildings and an environmentally friendly fleet of city vehicles.

Lloyd spearheaded a $5 billion upgrade of the Newtown Creek Wastewater Treatment Plant and expanded the Green Infrastructure Program, which includes curbside rain gardens.