The current meta-analysis aims to explore the effect of metformin use on vitamin B12 deficiency in patients with type 2 diabetes mellitus (T2DM) and the factors associated with it. This meta-analysis followed the Meta-analysis Of Observational Studies in Epidemiology (MOOSE) guidelines and the Preferred Reporting Items for Systematic reviews and Meta-Analysis (PRISMA) guidelines. We searched PubMed and EMBASE from January 1, 2010, to October 31, 2022, to collect the studies that reported the effect of metformin on the deficiency of vitamin B12 in patients with T2DM and the factors associated with it. A total of 17 studies were included in the current meta-analysis. Among all the included studies, 13 were cross-sectional studies, 3 were retrospective cohorts, and one was a case-control study. The pooled rate of deficiency of vitamin B12 in patients receiving metformin (23.16%) was significantly higher compared to patients who were not on metformin (17.4%) (OR: 2.95, 95% CI: 2.18-4.00, p-value: 0.001). Factors significantly associated with vitamin B12 deficiency in patients with T2DM and receiving metformin include the duration of metformin use and a greater dose of metformin. In conclusion, our meta-analysis found that the prevalence of vitamin B12 deficiency is greater in patients receiving metformin compared to patients who did not receive metformin. Given the importance of vitamin B12 in nutrition, metformin-induced B12 decrease may be harmful to patients with T2DM. Supplemental vitamin B12 may be advantageous for those on metformin.