Our work shows that TNF protects macrophage populations from L. pneumophila by licensing cells to rapidly self-sacrifice upon infection and limit the replicative niche of the bacteria. Here, TNF is linked to infection.