A conserved insulin-like pathway modulates both aging and pathogen resistance in Caenorhabditis elegans. However, the specific innate effector functions that mediate this pathogen resistance are largely unknown. Autophagy, a lysosomal degradation pathway, plays a role in controlling intracellular bacterial pathogen infections in cultured cells, but less is known about its role at the organismal level. We examined the effects of autophagy gene inactivation on Salmonella enterica Serovar Typhimurium (Salmonella typhimurium) infection in 2 model organisms, Caenorhabditis elegans and Dictyostelium discoideum. In both organisms, genetic inactivation of the autophagy pathway increases bacterial intracellular replication, decreases animal lifespan, and results in apoptotic-independent death. In C. elegans, genetic knockdown of autophagy genes abrogates pathogen resistance conferred by a loss-of-function mutation, daf-2(e1370), in the insulin-like tyrosine kinase receptor or by overexpression of the DAF-16 FOXO transcription factor. Thus, autophagy genes play an essential role in host defense in vivo against an intracellular bacterial pathogen and mediate pathogen resistance in long-lived mutant nematodes.