Heterotopic ossification, the pathologic formation of extraskeletal bone, occurs as a common complication of trauma or in genetic disorders and can be disabling and lethal. However, the underlying molecular mechanisms are largely unknown. Here we demonstrate that Gαs restricts bone formation to the skeleton by inhibiting Hedgehog signaling in mesenchymal progenitor cells. In progressive osseous heteroplasia, a human disease caused by null mutations in GNAS, which encodes Gαs, Hedgehog signaling is upregulated in ectopic osteoblasts and progenitor cells. In animal models, we show that genetically-mediated ectopic Hedgehog signaling is sufficient to induce heterotopic ossification, whereas inhibition of this signaling pathway by genetic or pharmacological means strongly reduces the severity of this condition. As our previous work has shown that GNAS gain-of-function mutations upregulate WNT-β-catenin signaling in osteoblast progenitor cells, resulting in their defective differentiation and fibrous dysplasia, we identify Gαs as a key regulator of proper osteoblast differentiation through its maintenance of a balance between the Wnt-β-catenin and Hedgehog pathways. Also, given the results here of the pharmacological studies in our mouse model, we propose that Hedgehog inhibitors currently used in the clinic for other conditions, such as cancer, may possibly be repurposed for treating heterotopic ossification and other diseases caused by GNAS inactivation.