Vertebrate Hedgehog signals are transduced through the primary cilium, a specialized lipid microdomain that is required for Smoothened activation. Cilia-associated sterol and oxysterol lipids bind to Smoothened to activate the Hedgehog pathway, but how ciliary lipids are regulated is incompletely understood. Here we identified DHCR7, an enzyme that produces cholesterol, activates the Hedgehog pathway, and localizes near the ciliary base. We found that Hedgehog stimulation negatively regulates DHCR7 activity and removes DHCR7 from the ciliary microenvironment, suggesting that DHCR7 primes cilia for Hedgehog pathway activation. In contrast, we found that Hedgehog stimulation positively regulates the oxysterol synthase CYP7A1, which accumulates near the ciliary base and produces oxysterols that promote Hedgehog signaling in response to pathway activation. Our results reveal that enzymes involved in lipid biosynthesis in the ciliary microenvironment promote Hedgehog signaling, shedding light on how ciliary lipids are established and regulated to transduce Hedgehog signals.