Osteosarcoma (OS) is a type of malignant primary bone cancer, which is highly aggressive and occurs more commonly in children and adolescents. Thus, novel potential drugs and therapeutic methods are urgently needed. In the present study, we aimed to elucidate the effects and mechanism of melatonin on OS cells to provide a potential treatment strategy for OS. The cell survival rate, cell viability, proliferation, migration, invasion and metastasis were examined by trypan blue assay, MTT, colony formation, wound healing, transwell invasion and attachment/detachment assay, respectively. The expression of relevant lncRNAs in OS cells was determined by real‐time qPCR analysis. The functional roles of lncRNA JPX in OS cells were further examined by gain and loss of function assays. The protein expression was measured by western blot assay. Melatonin inhibited the cell viability, proliferation, migration, invasion and metastasis of OS cells (Saos‐2, MG63 and U2OS) in a dose‐dependent manner. Melatonin treatment significantly downregulated the expression of lncRNA JPX in Saos‐2, MG63 and U2OS cells. Overexpression of lncRNA JPX into OS cell lines elevated the cell viability and proliferation, which was accompanied by the increased metastasis. We also found that melatonin inhibited the OS progression by suppressing the expression of lncRNA JPX via regulating the Wnt/β‐catenin pathway. Our results suggested that melatonin inhibited the biological functions of OS cells by repressing the expression of lncRNA JPX through regulating the Wnt/β‐catenin signalling pathway, which indicated that melatonin might be applied as a potentially useful and effective natural agent in the treatment of OS.