Diabetes mellitus adversely affects human bones and increases the risk of developing osteoporosis. In the present study, treatment with 30 mmol/l glucose was used to establish a high glucose (HG) cell model in vitro. Plasmids were used to overexpress the P2X purinoceptor 7 (P2X7) gene. Brilliant blue G and (4-benzoyl-benzoyl)-ATP were used as a P2X7 antagonist and agonist, respectively. Proliferation of osteogenic MC3T3-E1 cells and alkaline phosphatase (ALP) activity were determined using MTT and colorimetric assays, respectively. Alizarin Red S was used to assess calcification of MC3T3-E1 cells. Western blotting and reverse transcription-quantitative PCR were performed to determine protein and mRNA expression levels. The results demonstrated that HG inhibited MC3T3-E1 cell proliferation and P2X7 expression, reduced calcification, and downregulated the expression levels of ALP and osteocalcin (Ocn) in MC3T3-E1 cells. Overexpression of P2X7 in HG conditions increased calcification and proliferation, and upregulated the levels of ALP and Ocn in MC3T3-E1 cells. Inhibition of P2X7 downregulated the expressions of ALP and Ocn in MC3T3-E1 cells under HG conditions. Therefore, the present results indicated that HG caused damage to osteogenic MC3T3-E1 cells. Thus, P2X7 may be a regulatory factor that may be used to counteract the effects of HG on osteogenesis.