BackgroundTo analyze the clinical and radiological effects of type 2 diabetes mellitus on the prognosis of osteoporotic vertebral compression fracture after percutaneous vertebroplasty, and explore the prognostic value of osteoporotic fracture classification.MethodsOsteoporotic vertebral compression fracture patients who received vertebroplasty from January 1, 2016 to June 30, 2021 were divided into type 2 diabetes mellitus group and control group in this retrospective cohort study. Visual analogue scale, Oswestry Disability Index, bone cement leakage, new compression fracture, anterior, middle, and posterior portion heights of vertebral body and local Cobb angle on X-ray before surgery, 2 days after surgery, 6 months, and 12 months after surgery were recorded, and the osteoporotic fracture classification was performed.P< 0.05 was set as statistical significance.ResultsA total of 261 vertebral bodies were included, containing 68 in the type 2 diabetes mellitus group and 193 in the control group. There were no differences in baseline characteristics between the two groups. At 6 months after vertebroplasty, the local Cobb angle of the type 2 diabetes mellitus group was 8.29 ± 4.90° greater than that of the control group 6.05 ± 5.18° (P= 0.002). At 12 months, compared with pre-operation, the anterior portion height recovered 8.13 ± 12.90%, which was less than 12.51 ± 14.92% of the control group (P= 0.032), and 19.07 ± 16.47% of the middle portion height recovery was less than the control group’s 24.63 ± 17.67% (P= 0.024). Compared with the control group, osteoporotic fracture 2 vertebral bodies of the type 2 diabetes mellitus group at 12 months postoperatively in middle portion height (14.82 ± 14.71% vs 24.78 ± 18.16%,P= 0.023) and local Cobb angle (5.65 ± 4.06° vs 3.26 ± 4.86°,P= 0.043) restored significantly worse. Besides, osteoporotic fracture 3 with type 2 diabetes mellitus restored worse in anterior portion height (5.40 ± 11.02% vs 13.57 ± 12.79%,P= 0.008), middle portion height (11.22 ± 15.53% vs 17.84 ± 12.36%,P= 0.041) and local Cobb angle (10.85 ± 3.79 vs 7.97 ± 3.83°,P= 0.002) at 12 months postoperatively. There was no difference in radiological outcomes of osteoporotic fracture 4 between the two groups.ConclusionsThe degree of fractured vertebral compression, the recovery of the height and angle obtained immediately after surgery and the clinical symptoms in type 2 diabetes mellitus patients were not different from those in the control. However, vertebral body morphology of type 2 diabetes mellitus patients was worse since the sixth month after surgery. Osteoporotic fracture classification has a good prognostic reference value for both the control and the type 2 diabetes mellitus population.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13018-023-03792-8.