Joint diseases like osteoarthritis usually are accompanied with inflammatory processes, in which pro-inflammatory cytokines mediate the generation of intracellular reactive oxygen species (ROS) and compromise survival of subchondral osteoblasts. Melatonin is capable of manipulating bone formation and osteogenic differentiation of mesenchymal stem cells (MSCs). The aim of this work was to investigate the anti-inflammatory effect of melatonin on MSC proliferation and osteogenic differentiation in the absence or presence of interleukin-1 beta (IL-1β), which was used to induce inflammation. Our data showed that melatonin improved cell viability and reduced ROS generation in MSCs in a dose-dependent manner. When exposed to 10 ng/mL IL-1β, various concentrations of melatonin resulted in significant reduction of ROS by 34.9% averagely. Luzindole as a melatonin receptor antagonist reversed the anti-oxidant effect of melatonin in MSCs with co-exposure to IL-1β. Real-time RT-PCR data suggested that melatonin treatment up-regulated the expression of CuZnSOD and MnSOD, while down-regulated the expression of Bax. To investigate the effect of melatonin on osteogenesis, MSCs were cultured in osteogenic differentiation medium supplemented with IL-1β, melatonin, or luzindole. After exposed to IL-1β for 21 days, 1 μm melatonin treatment significantly increased the levels of type I collagen, ALP, and osteocalcin, and 100 μm melatonin treatment yielded the highest level of osteopontin. Our study demonstrated that melatonin maintained MSC survival and promoted osteogenic differentiation in inflammatory environment induced by IL-1β, suggesting melatonin treatment could be a promising method for bone regenerative engineering in future studies.