The retinoic acid-related orphan receptor gamma (RORgamma) has important roles in development and metabolic homeostasis. Although the biological functions of RORgamma have been studied extensively, no ligands for RORgamma have been identified, and no structure of RORgamma has been reported. In this study, we showed that hydroxycholesterols promote the recruitment of coactivators by RORgamma using biochemical assays. We also report the crystal structures of the RORgamma ligand-binding domain bound with hydroxycholesterols. The structures reveal the binding modes of various hydroxycholesterols in the RORgamma pocket, with the receptors all adopting the canonical active conformation. Mutations that disrupt the binding of hydroxycholesterols abolish the constitutive activity of RORgamma. Our observations suggest an important role for the endogenous hydroxycholesterols in modulating RORgamma-dependent biological processes.