Renata Kaznowska and Aldona Machnowska-Góra resigned from their posts, Trzaskowski told a news conference, adding that he had not yet decided who would replace them.
The departures follow allegations first reported by the online outlet Kanał Zero and the news website Onet, concerning the mortuary at Warsaw's Południowy (Southern) Hospital.
The mortuary's head is alleged to have promoted a funeral home run by his business partner, posted photographs of bodies and human remains on social media and allowed the premises to be rented out as a film set.
There were also reports that bodies and funeral services were sold illegally.
Trzaskowski said he was moving to reduce political parties' influence over Warsaw's municipal companies.
Building on an existing ban on party members sitting on the oversight bodies of medical facilities, he said the rule would now extend to the management and supervisory boards of all city-owned companies.
Those affected have until the end of July to choose between their board role and their party membership, though they could keep their position if they left their grouping.
The mayor said he had met the heads of the capital's 11 municipal hospitals on Thursday to reinforce anti-corruption rules brought in during 2024, and that extra checks were under way in accident and emergency units and mortuaries.
Trzaskowski added there would be "zero tolerance" for fraud and for staff using personal connections to jump queues, adding that politicians were entitled to treatment at city hospitals but not to preferential access.
In social media posts, Machnowska-Góra said the mortuary case was shocking to her too, and that she felt responsibility rather than guilt.
Kaznowska said she was leaving "without regret or bad feelings" but called it one of the hardest decisions of her life.
The affair follows separate reports about a doctor at the same hospital who also served as a city councillor for the ruling Civic Coalition (KO) party in Warsaw's Ursus district.
He was reported to have earned PLN 1.6 million (EUR 373,000) last year while training as an anaesthetist, with allegations that fellow party members were treated without queuing in his department.
(ał)
Source: PAP