Small-molecule ligands of nuclear hormone receptors (NHRs) govern the transcriptional regulation of metazoan development, cell differentiation, and metabolism. However, the physiological ligands of many NHRs remain poorly characterized, primarily due to lack of robust analytical techniques. Using comparative metabolomics, we identified endogenous steroids that act as ligands of the C. elegans NHR, DAF-12, a vitamin D and liver X receptor homolog regulating larval development, fat metabolism, and lifespan. The identified molecules feature unexpected chemical modifications and include only one of two DAF-12 ligands reported earlier, necessitating a revision of previously proposed ligand biosynthetic pathways. We further show that ligand profiles are regulated by a complex enzymatic network, including the Rieske oxygenase DAF-36, the short-chain dehydrogenase DHS-16, and the hydroxysteroid dehydrogenase HSD-1. Our results demonstrate the advantages of comparative metabolomics over traditional candidate-based approaches and provide a blueprint for the identification of ligands for other C. elegans and mammalian NHRs.