Cellular lipids are speculated to act as key intermediates in Hedgehog signal transduction, but their precise identity and function remain enigmatic. In an effort to identify such lipids, we pursued a Hedgehog pathway inhibitory activity that is particularly abundant in flagellar lipids of Chlamydomonas reinhardtii, resulting in the purification and identification of ergosterol endoperoxide, a B-ring oxysterol. A mammalian analog of ergosterol, 7-dehydrocholesterol (7-DHC), accumulates in Smith–Lemli–Opitz syndrome, a human genetic disease that phenocopies deficient Hedgehog signaling and is caused by genetic loss of 7-DHC reductase. We found that depleting endogenous 7-DHC with methyl-β-cyclodextrin treatment enhances Hedgehog activation by a pathway agonist. Conversely, exogenous addition of 3β,5α-dihydroxycholest-7-en-6-one, a naturally occurring B-ring oxysterol derived from 7-DHC that also accumulates in Smith–Lemli–Opitz syndrome, blocked Hedgehog signaling by inhibiting activation of the essential transduction component Smoothened, through a mechanism distinct from Smoothened modulation by other lipids.