BackgroundMesoderm is generally considered to be a germ layer that is unique to Bilateria, and it develops into diverse tissues, including muscle, and in the case of vertebrates, the skeleton and notochord. Studies on various deuterostome animals have demonstrated that fibroblast growth factor (FGF) signaling is required for the formation of many mesodermal structures, such as vertebrate somites, from which muscles are differentiated, and muscles in sea urchin embryos, suggesting an ancient role of FGF signaling in muscle development. However, the formation of trunk muscles in invertebrate chordates is FGF-independent, leading to ambiguity about this ancient role in deuterostomes. To further understand the role of FGF signaling during deuterostome evolution, we investigated the development of mesodermal structures during embryogenesis and metamorphosis in Ptychodera flava, an indirect-developing hemichordate that has larval morphology similar to echinoderms and adult body features that are similar to chordates.ResultsHere we show that genes encoding FGF ligands, FGF receptors and transcription factors that are known to be involved in mesoderm formation and myogenesis are expressed dynamically during embryogenesis and metamorphosis. FGF signaling at the early gastrula stage is required for the specification of the mesodermal cell fate in P. flava. The mesoderm cells are then differentiated stepwise into the hydroporic canal, the pharyngeal muscle and the muscle string; formation of the last two muscular structures are controlled by FGF signaling. Moreover, augmentation of FGF signaling during metamorphosis accelerated the process, facilitating the transformation from cilia-driven swimming larvae into muscle-driven worm-like juveniles.ConclusionsOur data show that FGF signaling is required for mesoderm induction and myogenesis in the P. flava embryo, and it is reiteratively used for the morphological transition during metamorphosis. The dependence of muscle development on FGF signaling in both planktonic larvae and sand-burrowing worms supports its ancestral role in deuterostomes.Electronic supplementary materialThe online version of this article (10.1186/s12862-018-1235-9) contains supplementary material, which is available to authorized users.