The orphan G protein-coupled receptor (GPCR) GPR161 is enriched in primary cilia, where it plays a central role in suppressing Hedgehog signaling1. GPR161 mutations lead to developmental defects and cancers2,3,4. The fundamental basis of how GPR161 is activated, including potential endogenous activators and pathway-relevant signal transducers, remains unclear. To elucidate GPR161 function, we determined a cryogenic-electron microscopy structure of active GPR161 bound to the heterotrimeric G protein complex Gs. This structure revealed an extracellular loop 2 that occupies the canonical GPCR orthosteric ligand pocket. Furthermore, we identify a sterol that binds to a conserved extrahelical site adjacent to transmembrane helices 6 and 7 and stabilizes a GPR161 conformation required for Gs coupling. Mutations that prevent sterol binding to GPR161 suppress cAMP pathway activation. Surprisingly, these mutants retain the ability to suppress GLI2 transcription factor accumulation in cilia, a key function of ciliary GPR161 in Hedgehog pathway suppression. By contrast, a protein kinase A-binding site in the GPR161 C-terminus is critical in suppressing GLI2 ciliary accumulation. Our work highlights how unique structural features of GPR161 interface with the Hedgehog pathway and sets a foundation to understand the broader role of GPR161 function in other signaling pathways.