Although infections with virulent pathogens often induce a strong inflammatory reaction, what drives the increased immune response to pathogens compared to nonpathogenic microbes is poorly understood. One possibility is that the immune system senses the level of threat from a microorganism and augments the response accordingly. Here, focusing on cytotoxic necrotizing factor 1 (CNF1), an Escherichia coli-derived effector molecule, we showed the host indirectly sensed the pathogen by monitoring for the effector that modified RhoGTPases. CNF1 modified Rac2, which then interacted with the innate immune adaptors IMD and Rip1-Rip2 in flies and mammalian cells, respectively, to drive an immune response. This response was protective and increased the ability of the host to restrict pathogen growth, thus defining a mechanism of effector-triggered immunity that contributes to how metazoans defend against microbes with pathogenic potential.