The Sardinians were beaten 3-1 by Roma on Sunday afternoon in what proved to be Lopez's last game in charge.
"The necessity to shake up the team in this final stage of the season to achieve the objective of safety made a change of management indispensable," read a statement on the club's website.
"This decision is very painful, as Lopez has proved himself as a professional and a man, and in the past as a symbol and captain of the squad.
"The club thanks the coach for his work and wishes him all the best for his future endeavours."
Cagliari are currently 15th in the Serie A table and stand five points above the relegation zone.