Background: Metformin has long been used for glycemic control in diabetic state. Recently, other benefits of metformin beyond blood glucose regulation have emerged. Objectives: To investigate the effect of metformin on the expression of testicular steroidogenesis-related genes, spermatogenesis, and fertility of male diabetic rats. Materials and methods: Eighteen adult male Sprague Dawley rats were divided into three groups, namely normal control (NC), diabetic control (DC), and metformin-treated (300 mg/kg body weight/day) diabetic rats (D+Met). Diabetes was induced using a single intraperitoneal injection of streptozotocin (60 mg/kg b.w.), followed by oral treatment with metformin for four weeks. Results: Diabetes decreased serum and intratesticular testosterone levels and increased serum but not intratesticular levels of luteinizing hormone. Sperm count, motility, viability, and normal morphology were decreased, while sperm nuclear DNA fragmentation was increased in DC group, relative to NC group. Testicular mRNA levels of androgen receptor, luteinizing hormone receptor, cytochrome P450 enzyme (CYP11A1), steroidogenic acute regulatory (StAR) protein, 3b-hydroxysteroid dehydrogenase (HSD), and 17b-HSD, as well as the level of StAR protein and activities of CYP11A1, 3b-HSD, and 17b-HSD, were decreased in DC group. Similarly, decreased activities of epididymal antioxidant enzymes and increased lipid peroxidation were observed in DC group. Consequently, decreased litter size, fetal weight, mating and fertility indices, and increased pre-and post-implantation losses were recorded in DC group. Following intervention with metformin, we observed increases in serum and intratesticular testosterone levels, Leydig cell count, improved sperm parameters, and decreased sperm nuclear DNA fragmentation. Furthermore, mRNA levels and activities of steroidogenesis-related enzymes were increased, with improved fertility outcome. Discussion and conclusion: Diabetes mellitus is associated with dysregulation of steroidogenesis, abnormal spermatogenesis, and fertility decline. Controlling hyperglycemia is therefore crucial in preserving male reproductive function. Metformin not only regulates blood glucose level, but also preserves male fertility in diabetic state. Research has shown that DM impairs several aspects of the male reproductive function (Nna et al., 2017a). Decreased daily sperm production, sperm count, motility and viability, increased 110