Hedgehog signaling pathway participates in a chain of necessary physiological activities and dysregulation of the hedgehog signaling has been implicated in birth defects and diseases. Although substantial studies have uncovered that the hedgehog pathway is both sufficient and necessary for patterning vertebrate muscle differentiation, limited knowledge is available about its role in molluscan myogenesis. Here, the present study firstly identified and characterized the key genes (CgHh, CgPtc, CgSmo, CgGli) in the hedgehog pathway of the Pacific oyster Crassostrea gigas, and investigated the function of this pathway in embryonic myogenesis of C. gigas. Bioinformatics analysis revealed that the functional domains of the key genes were highly conserved among species. Quantitative analysis indicated that CgHh, CgPtc, CgGli mRNA began to accumulate during the blastula to gastrulation stages and accumulated throughout trochophore and into the D-shaped stage. RNA localization patterns by whole-mount in situ hybridization revealed that the key genes own the strongest specific staining in gastrulation, trochophore, and D-shaped stage. Hedgehog pathway genes showed a high expression level in myogenesis stage including trochophore and D-shaped stages, suggesting that the hedgehog pathway would be involved in myogenesis of C. gigas. In adult oysters, the key genes were expressed at various tissues, indicating that hedgehog pathway governed a series of development events. To further examine the role of hedgehog signaling in C. gigas myogenesis, we used cyclopamine treatment in C. gigas larvae to inhibit the signaling pathway. The quantification of the expression of the key genes in hedgehog pathway showed that expressions of key genes were severely down-regulated in treated larvae compared with normal larvae. The velum retractors, ventral retractors, anterior adductor, and posterior adductor muscles of larvae treated with cyclopamine at 4–6 μM for 6–12 h were severely destroyed, suggesting that the hedgehog pathway took part in the myogenesis of C. gigas. These findings provide a foundation for uncovering the molecular mechanisms of hedgehog signaling in molluscan physiological activity and enable us to better understand the signaling pathway involving in molluscan physiological activity.