The RAR-related orphan receptor gamma t (RORγt) is a nuclear receptor required for generating IL-17-producing CD4 + Th17 T cells, which are essential in host defense and may play key pathogenic roles in autoimmune diseases. Oxysterols elicit profound effects on immune and inflammatory responses as well as on cholesterol and lipid metabolism. Here, we describe the identification of several naturally occurring oxysterols as RORγt agonists. The most potent and selective activator for RORγt is 7β, 27-dihydroxycholesterol (7β, 27-OHC). We show that these oxysterols reverse the inhibitory effect of an RORγt antagonist, ursolic acid, in RORγ-or RORγt-dependent cell-based reporter assays. These ligands bind directly to recombinant RORγ ligand binding domain (LBD), promote recruitment of a coactivator peptide, and reduce binding of a corepressor peptide to RORγ LBD. In primary cells, 7β, 27-OHC and 7α, 27-OHC enhance the differentiation of murine and human IL-17-producing Th17 cells in an RORγt-dependent manner. Importantly, we showed that Th17, but not Th1 cells, preferentially produce these two oxysterols. In vivo, administration of 7β, 27-OHC in mice enhanced IL-17 production. Mice deficient in CYP27A1, a key enzyme in generating these oxysterols, showed significant reduction of IL-17-producing cells, including CD4+ and γδ + T cells, similar to the deficiency observed in RORγt knockout mice. Our results reveal a previously unknown mechanism for selected oxysterols as immune modulators and a direct role for CYP27A1 in generating these RORγt agonist ligands, which we propose as RORγt endogenous ligands, driving both innate and adaptive IL-17-dependent immune responses.