Calcium (Ca2+) is an essential mineral that must be strictly regulated to support numerous physiological activities1,2. Extracellular fluid Ca2+ is regulated in vertebrates through endocrine systems that manage the vast Ca2+ reservoir in the bones3–6, but the Ca2+ regulatory mechanisms used by invertebrates, which lack bones, remain largely unclear. Here we identified a potent peptide hormone, Capa, which is responsible for regulating extracellular fluid Ca2+ levels in the fruit fly Drosophila melanogaster. Capa-deficient larvae exhibit low haemolymph Ca2+ levels, resulting in reduced locomotion and induced elongated pupae that mimic those of animals reared on a Ca2+-free diet. Capa secreted from specific neurosecretory cells acts on specialized Ca2+ storage compartments in the anterior Malpighian tubules, elevating haemolymph Ca2+. This endocrine mechanism governing Ca2+ regulation in terrestrial invertebrates resembles the parathyroid hormone system in vertebrates. The peptide hormone Capa is responsible for regulating extracellular fluid Ca2+ levels in the fruit fly Drosophila melanogaster.