Due to the large amounts of calcium transferred to milk from mammary glands, periparturient dairy goats face challenges with calcium metabolism disorder and hypocalcemia. Serotonin (5-hydroxytryphtamine, 5-HT), the product of 5-hydroxy-l-tryptophan (5-HTP) catalysed by tryptophan hydroxylase 1 (TPH1), is a multifunctional monoamine thought to be a homeostatic regulator of the animal. The objective of the current study was to investigate the effects and underlying mechanisms of intramuscular 5-HTP injections on calcium homeostasis in the goat mammary glands. In the in vivo experiment, thirty multiparous Guanzhong dairy goats were randomly assigned to two groups, one group was injected with 5-HTP intramuscularly and the other group was injected with normal saline. From the first 10 days of the expected date for delivery, 5-HTP or saline was injected into goats through the shoulder muscle every morning before feeding, with a dose of 1 mg/kg per body weight. In the in vitro experiment, goat mammary epithelial cells (GMEC) were treated with 100 μM 5-HT for the evaluation of 5-HT in calcium transportation. The results demonstrated that 5-HTP treatment had no effect on the basic composition of colostrum (P > 0.05) but increased the serum 5-HT concentrations on d -5, -4, -3 and d 5 relative to parturition (P <0.05). The 5-HTP injection group had greater serum calcium concentration on d 4 and greater serum parathyroid hormone related protein (PTHrP) on d -5, -4, -1, 3, 4, and 5 compared to the saline injection group (P <0.05). It was further confirmed that 5-HT could increase intracellular calcium levels by increasing PTHrP and decreasing plasma-membrane Ca2+-ATPases1(PMCA1) in GMEC (P <0.05). In conclusion, 5-HTP treatment in multiparous goats during the transition period form pregnancy to lactation is a feasible way to protect goats form calcium metabolism disorder.