Testicular dysfunction, a severe secondary complication of diabetes, negatively affects reproductive health. Ghrelin is a peptide that plays a role in many metabolic events, such as stimulating growth hormones and regulating appetite, blood pressure, and reproduction. Metformin has antiinflammatory and antioxidant properties and is widely used to treat type 2 diabetes. Therefore, in this study, to investigate the effects of ghrelin and metformin on testicular function in experimental diabetic rats given streptozotocin, placed on a high-fat diet, and that had their sperm parameters evaluated, testosterone hormone, caspase 3 and iNOS expression, and histopathological examinations were performed. In total, 38 Wistar albino male rats were randomized into 4 groups (a control group, diabetes group, diabetes + ghrelin group, and diabetes + metformin group) with different numbers. It was determined that spermatozoa concentration, motility, and testosterone levels were lower (p < 0.001), caspase 3 and iNOS expression levels (p < 0.05) were higher, and abnormal sperm rates were higher (p < 0.001) in the diabetic group compared to the other groups. Metformin and ghrelin administered to the diabetes group increased spermatozoa concentration, motility, and testosterone levels (p < 0.001) and decreased caspase 3 and iNOS expression levels, as well as abnormal sperm rates (p < 0.05). Based on these findings, we propose that ghrelin and metformin can be used to protect reproductive health in testicular dysfunction caused by diabetes.