Animals have evolved mechanisms, such as cell competition, to remove dangerous or nonfunctional cells from a tissue. Tumor necrosis factor signaling can eliminate clonal malignancies from Drosophila imaginal epithelia, but why this pathway is activated in tumor cells but not normal tissue is unknown. We show that the ligand that drives elimination is present in basolateral circulation but remains latent because it is spatially segregated from its apically localized receptor. Polarity defects associated with malignant transformation cause receptor mislocalization, allowing ligand binding and subsequent apoptotic signaling. This process occurs irrespective of the neighboring cells' genotype and is thus distinct from cell competition. Related phenomena at epithelial wound sites are required for efficient repair. This mechanism of polarized compartmentalization of ligand and receptor can generally monitor epithelial integrity to promote tissue homeostasis.