Calcineurin is a highly conserved calcium/calmodulin-dependent serine/threonine protein phosphatase with diverse functions. Inhibition of calcineurin is known to enhance the lifespan of Caenorhabditis elegans through multiple signaling pathways. Aiming to study the role of calcineurin in regulating innate immunity, we discover that calcineurin is required for the rhythmic defecation motor program (DMP) in C. elegans. Calcineurin inhibition leads to defects in the DMP, resulting in intestinal bloating, rapid colonization of the gut by bacteria, and increased susceptibility to bacterial infection. We demonstrate that intestinal bloating caused by calcineurin inhibition mimics the effects of calorie restriction, resulting in enhanced lifespan. The TFEB ortholog, HLH-30, is required for lifespan extension mediated by calcineurin inhibition. Finally, we show that the nuclear hormone receptor, NHR-8, is upregulated by calcineurin inhibition and is necessary for the increased lifespan. Our studies uncover a role for calcineurin in the C. elegans DMP and provide a new mechanism for calcineurin inhibition-mediated longevity extension.