The function of melatonin (MLT) in promoting fracture healing has been demonstrated in previous studies. However, the molecular mechanism underlying therapeutic effects of MLT is not entirely clear. In this study, mesenchymal stem cells (MSCs) were isolated from rat bone marrow and identified by flow cytometry. We found that MLT treatment upregulated the neuropeptide Y (NPY) and NPY receptor Y1 (NPY1R) expression, and promoted the proliferation and migration of MSCs, which was suppressed by BIBP3226, an inhibitor of NPY1R. Moreover, the levels of NPY and NPY1R in MSCs undergoing osteoblastic differentiation were upregulated after MLT administration. MLT-induced osteoblastic differentiation of MSCs was suppressed by BIBP3226 treatment, as evidenced by decreased levels of alkaline phosphatase (ALP), collagen type I α1 chain, osteocalcin, and runt-related transcription factor 2, downregulated activity of ALP, as well as reduced calcium nodule formation. Furthermore, we demonstrated that MLT could promote fracture healing in a rat model of femoral fracture, which was accompanied by the elevated expression of NPY and NPY1R. The administration of BIBP3226 inhibited fracture healing mediated by MLT. To sum up, our results show that MLT promotes osteoblastic differentiation of MSCs and fracture healing by NPY/NPY1R signaling.