Enterohaemorrhagic Escherichia coli (EHEC) causes life-threatening infections in humans as a consequence of the production of Shiga-like toxins. Lack of a good animal model system currently hinders in vivo study of EHEC virulence by systematic genetic methods. Here we applied the genetically tractable animal, Caenorhabditis elegans, as a surrogate host to study the virulence of EHEC as well as the host immunity to this human pathogen. Our results show that E. coli O157:H7, a serotype of EHEC, infects and kills C. elegans. Bacterial colonization and induction of the characteristic attaching and effacing (A/E) lesions in the intact intestinal epithelium of C. elegans by E. coli O157:H7 were concomitantly demonstrated in vivo. Genetic analysis indicated that the Shiga-like toxin 1 (Stx1) of E. coli O157:H7 is a virulence factor in C. elegans and is required for full toxicity. Moreover, the C. elegans p38 mitogen-activated protein kinase (MAPK) pathway, anevolutionarily conserved innate immune and stress response signalling pathway, is activated in the regulation of host susceptibility to EHEC infection in a Stx1-dependent manner. Our results validate the EHEC–C. elegans interaction as suitable for future comprehensive genetic screens for both novel bacterial and host factors involved in the pathogenesis of EHEC infection.