Extracellular ATP is released from live cells in controlled conditions, as well as dying cells in inflammatory conditions, and, thereby, regulates T cell responses, including Th17 cell induction. The level of extracellular ATP is closely regulated by ATP hydrolyzing enzymes, such as ecto-nucleoside triphosphate diphosphohydrolases (ENTPDases). ENTPDase1/CD39, which is expressed in immune cells, was shown to regulate immune responses by downregulating the ATP level. In this study, we analyzed the immunomodulatory function of ENTPDase7, which is preferentially expressed in epithelial cells in the small intestine. The targeted deletion of Entpd7 encoding ENTPDase7 in mice resulted in increased ATP levels in the small intestinal lumen. The number of Th17 cells was selectively increased in the small intestinal lamina propria in Entpd7(-/-) mice. Th17 cells were decreased by oral administration of antibiotics or the ATP antagonist in Entpd7(-/-) mice, indicating that commensal microbiota-dependent ATP release mediates the enhanced Th17 cell development in the small intestinal lamina propria of Entpd7(-/-) mice. In accordance with the increased number of small intestinal Th17 cells, Entpd7(-/-) mice were resistant to oral infection with Citrobacter rodentium. Entpd7(-/-) mice suffered from severe experimental autoimmune encephalomyelitis, which was associated with increased numbers of CD4(+) T cells producing both IL-17 and IFN-γ. Taken together, these findings demonstrate that ENTPDase7 controls the luminal ATP level and, thereby, regulates Th17 cell development in the small intestine.