The origin of paired appendages was a major evolutionary innovation for vertebrates, marking the first step towards fin- (and later limb-) driven locomotion. The earliest vertebrate fossils lack paired fins but have well-developed median fins, suggesting that the mechanisms of fin development were assembled first in the midline. Here we show that shark median fin development involves the same genetic programs that operate in paired appendages. Using molecular markers for different cell types, we show that median fins arise predominantly from somitic (paraxial) mesoderm, whereas paired appendages develop from lateral plate mesoderm. Expression of Hoxd and Tbx18 genes, which specify paired limb positions, also delineates the positions of median fins. Proximodistal development of median fins occurs beneath an apical ectodermal ridge, the structure that controls outgrowth of paired appendages. Each median fin bud then acquires an anteroposteriorly-nested pattern of Hoxd expression similar to that which establishes skeletal polarity in limbs. Thus, despite their different embryonic origins, paired and median fins utilize a common suite of developmental mechanisms. We extended our analysis to lampreys, which diverged from the lineage leading to gnathostomes before the origin of paired appendages, and show that their median fins also develop from somites and express orthologous Hox and Tbx genes. Together these results suggest that the molecular mechanisms for fin development originated in somitic mesoderm of early vertebrates, and that the origin of paired appendages was associated with re-deployment of these mechanisms to lateral plate mesoderm.