Ranolazine is an anti-anginal drug that mediates its effects by inhibition of cardiac late sodium current. Although it is not indicated for the treatment of type 2 diabetes mellitus (T2DM), several clinical trials have shown that ranolazine was associated with a reduction in HbA1c. The objective of this meta-analysis is to determine the efficacy and safety of ranolazine in improving glycemic control in patients with T2DM. A total of five randomized controlled trials involving 2,680 patients were included in the analysis. The pooled analysis showed that ranolazine may improve glycemic control with a modest decrease in HbA1c and FBS. The difference in HbA1c was -0.38% (95% CI -0.59 to -0.17), favoring ranolazine. Sensitivity analysis showed a difference of HbA1c of -0.49% (CI -0.67, -0.31), still favoring the ranolazine group. There was also a statistically significant difference in fasting glucagon, favoring the ranolazine group (-2.70 pg/ml: 95% CI -5.24 to -0.16). The risk of hypoglycemia with ranolazine was comparable with placebo (RR 1.27 95% CI 0.84 to 1.91). Overall, ranolazine appears to be a safe and effective option for improving glycemic control in patients with T2DM, with a modest decrease in HbA1c and FBS, and a lower risk of hypoglycemia compared to placebo. However, further studies are needed to confirm these findings and to investigate the long-term safety and efficacy of ranolazine in this patient population.