Implant dentures become the first choice for denture restoration in patients with tooth loss. However, oral implants often fail in osteoporosis (OP) patients. Melatonin (MT) induces osteogenic differentiation of bone mesenchymal stem cells (BMSCs), suggesting its therapeutic potential in OP treatment. Long non-coding RNA H19 induces osteogenic differentiation of BMSCs, while its regulatory mechanism in MT-involved osteogenic and adipogenic differentiation of BMSCs remains elusive. Ovariectomized (OVX) rat was used to construct an OP model, and bone quality was assessed. Meanwhile, the expression of H19, miR-541-3p, MT and adiponectin (APN) was examined by quantitative reverse transcription-PCR (qRT-PCR) or ELISA. The adipogenic and osteogenic differentiation of BMSCs were determined by oil red O staining and alizarin red S staining, respectively. The targeting relationships between H19, miR-541-3p and APN mRNA were predicted by bioinformatics and confirmed by RNA immunoprecipitation and dual-luciferase reporter assay. The results showed that MT, H19 and APN were down-regulated, while miR-541-3p was up-regulated in the OVX rat model. At the cellular level, MT reduced adipogenic differentiation, heightened osteogenic differentiation of BMSCs, and activated Wnt/β-catenin pathway, which were reversed by the MT2 selective inhibitor 4-P-PDOT. Overexpressing H19 facilitated the osteogenic differentiation and inhibited the adipogenic differentiation of BMSCs mediated by MT, while H19 knockdown or overexpressing miR-541-3p had the opposite effect. Moreover, H19 functioned as a competitive endogenous RNA and sponged miR-541-3p, and miR-541-3p targeted APN. Overall, MT modulates the osteogenic and adipogenic differentiation of BMSCs by mediating H19/miR-541-3p/APN axis, providing a new reference for the targeted therapy of OP.