T-helper 17 (Th17) cells play a dual role in immunological responses, serving as essential components in tissue homeostasis and host defense against microbial pathogens while also contributing to pro-inflammatory conditions and autoimmunity. While Transforming Growth Factor-beta 1 (TGFβ1) is pivotal for the differentiation of non-pathogenic Th17 cells, the role of TGFβ3 and Activin in steering Th17 cells toward a pathogenic phenotype has been acknowledged. However, the molecular mechanisms governing this dichotomy remain elusive. In this study, we demonstrate that the transcription factor Foxo1 is upregulated in a TGFβ1 dose-dependent manner, serving as a critical regulator that specifically modulates the fate of pathogenic Th17 cells. Analyses in both uveitis patients and an Experimental Autoimmune Uveitis (EAU) mouse model reveal a strong correlation between disease severity and diminished Foxo1 expression levels. Ectopic expression of Foxo1 selectively attenuates IL-17A production under pathogenic Th17-inducing conditions. Moreover, enhanced Foxo1 expression, triggered by TGFβ1 signaling, is implicated in fatty acid metabolism pathways that favor non-pathogenic Th17 differentiation. Our drug screening identifies several FDA-approved compounds can upregulate Foxo1. Collectively, our findings offer evidence that Foxo1 serves as a molecular switch to specifically control pathogenic versus non-pathogenic Th17 differentiation in a TGFβ1-dependent manner. Suggest that targeting Foxo1 could be a promising therapeutic strategy for autoimmune diseases.