Background: Patients with type 2 diabetes have poor medication adherence. Medication literacy is one of the influencing factors of medication adherence among patients with type 2 diabetes. However, the mechanism by which medication literacy affects medication adherence among patients with type 2 diabetes is unclear. The aim of this study was to verify the mediating role of self-efficacy in the relationship between medication literacy and medication adherence. Methods: A total of 402 patients with type 2 diabetes were enrolled in this study. The Chinese versions of the Medication Literacy Scale, the Self-Efficacy for Appropriate Medication Use Scale and the Morisky Medication Adherence Scale-8 were used in the survey. Pearson correlation analysis was used to find correlations among medication literacy, self-efficacy and medication adherence. The PROCESS macro (Version 4.1) with Model 4 for SPSS was used to verify the mediating role of self-efficacy. Results: Twenty-four percent of the participants had poor medication adherence. Self-efficacy and medication literacy (r=0.499, p < 0.01) and medication adherence (r=0.499, p < 0.01) were significantly and positively correlated. Self-efficacy partially mediated the relationship between medication knowledge and medication adherence among patients with type 2 diabetes, accounting for 36.7% of the total effect. Conclusion: Self-efficacy had a partial mediating effect on the relationship between medication literacy and medication adherence among patients with type 2 diabetes. Self-efficacy should be improved through effective measures to increase patients' confidence in adherence to antihyperglycemic drugs.