Background and aimsStudies have demonstrated that the short-term use of metformin benefits liver function among patients with type 2 diabetes mellitus (T2DM). However, few studies have reported on the effects of long-term metformin treatment on liver function or liver histology. This study investigated the correlation between metformin use and the incidence of nonalcoholic fatty liver disease (NAFLD) among patients with T2DM.MethodsThis population-based study investigated the risk of NAFLD among patients with T2DM who received metformin treatment between 2001-2018. Metformin users and metformin nonusers were enrolled and matched to compare the risk of NAFLD.ResultsAfter 3 years, the patients who received <300 cDDD of metformin and those with metformin use intensity of <10 and 10–25 DDD/month had odds ratios (ORs) of 1.11 (95% confidence interval [CI] = 1.06–1.16), 1.08 (95% CI = 1.02–1.13), and 1.18 (95% CI = 1.11–1.26) for NAFLD, respectively. Moreover, metformin users who scored high on the Diabetes Complications and Severity Index (DCSI) were at high risk of NAFLD. Patients with comorbid hyperlipidemia, hyperuricemia, obesity, and hepatitis C were also at high risk of NAFLD.ConclusionPatients with T2DM who received metformin of <300 cDDD or used metformin at an intensity of <10 and 10–25 DDD/month were at a high risk of developing NAFLD. The results of this study also indicated that patients with T2DM receiving metformin and with high scores on the DCSI were at a high risk of developing NAFLD.