Dysfunction of Paneth and goblet cells in the intestine contributes to inflammatory bowel disease (IBD) and colitis-associated colorectal cancer (CAC). Here, we report a role for the NAD+-dependent histone deacetylase SIRT1 in the control of anti-bacterial defense. Mice with an intestinal specific Sirt1 deficiency (Sirt1int-/-) have more Paneth and goblet cells with a consequent rearrangement of the gut microbiota. From a mechanistic point of view, the effects on mouse intestinal cell maturation are mediated by SIRT1-dependent changes in the acetylation status of SPDEF, a master regulator of Paneth and goblet cells. Our results suggest that targeting SIRT1 may be of interest in the management of IBD and CAC.