Education Minister Patricia Correa and Culture Minister Jair Perez announced their resignations on Twitter, citing the deaths of individuals during the unrest.
"This morning I presented my letter of resignation from the position of education minister," Correa tweeted.
"The death of compatriots has no justification. State violence cannot be disproportionate and cause death."
Peru's Congress also rejected on Friday a proposed constitutional reform that would have brought presidential elections forward to December 2023, one of the protesters' key demands.
Peru has been through years of political turmoil, with multiple leaders accused of corruption, frequent impeachment attempts, and presidential terms cut short.
The cabinet departures now raise questions about the longevity of the government of President Dina Boluarte, the former vice president, who was sworn in on December 7 after Castillo was removed from office by a congressional vote hours after he attempted to dissolve Congress.
Demonstrators are calling for early elections, the closure of congress, a constituent assembly and Boluarte's resignation.
Protests continued Friday, with key roads blocked and five airports forced to close.
At least 16 people have been killed in the protests so far, authorities have said.
The death toll could be as high as 20, Eliana Revollar, head of Peru's ombudsman's office, said in an interview with local radio RPP.
On Thursday, eight people were killed in clashes between security forces and protesters in Ayacucho, according to local authorities, after a Supreme Court panel ordered an 18-month pre-trial detention for Castillo while he is investigated over charges of "rebellion and conspiracy".
Castillo has denied wrongdoing and says he remains the country's lawful president.
The United Nations on Friday expressed "deep concern" over reports of deaths and detentions of minors involved in the demonstrations.
A criminal complaint has been filed with prosecutors specialising in human rights in the Ayacucho province of Huamanga to determine "responsibility for the serious violations" there, the ombudsman's office said in a statement, without giving further details.
Boluarte's government announced a state of emergency on Wednesday, granting police special powers and limiting freedoms including the right to assembly but it appears to have had little effect in stemming the protests.