Epithelial cells respond to infection with the intracellular bacterial pathogen Listeria monocytogenes by altering their mechanics to promote collective infected cell extrusion (CICE) and limit infection spread across cell monolayers. However, the underlying biochemical pathways remain elusive. Here, using in vitro (epithelial monolayers) and in vivo (zebrafish larvae) models of infection with L. monocytogenes or Shigella flexneri, we explored the role of extracellular-signal-regulated kinase (ERK) activity waves in coordinating the mechanical battle between infected and surrounder uninfected cells that leads to CICE. We discovered that when ERK waves are suppressed, cells fail to exhibit alterations in cell shape and kinematics associated with CICE and behave more like quiescent uninfected monolayers. In particular, uninfected cells surrounding infection foci are unable to polarize, reinforce their monolayer stresses, and promote CICE. Our findings reveal that crosstalk between ERK waves and cell mechanics is key to collective elimination of large domains of infected cells.