Background Diabetes mellitus impairs the reproductive system by damaging the glands and changing their function and hormone secretions. Given the previous studies on medical properties of silk cocoon, the aim of this study was to investigate the effect of the hydroalcoholic extract of silk cocoon on pituitary-gonadal axis hormones and the testis changes in diabetic male rats. Methods In this experimental study, 35 male rats were divided into 5 equal groups. Control (C), nontreated diabetic rats (DNT1), and experimental diabetic rats treated (DT1) with a silk cocoon extract at concentrations of 200, 400, and 800 mg/kg for 56 days. Diabetes was induced by an injection of streptozotocin. Blood sampling was performed by the tail and heart after fasting. Body weight, serum levels of glucose, prolactin, leptin, inhibin A, IGF-2, activin A, insulin, LH, testosterone, FSH, and GnRH were measured along with the testis weight and diameter as the outcome of the study. Data were analyzed by SPSS version 20. Results Investigation of hormonal factors indicated that all diabetic groups had higher prolactin, inhibin A levels than those in C group and lower leptin, IGF-2, activin A, insulin, LH, testosterone, FSH, and GnRH levels than controls. Silk cocoon treatment significantly decreased prolactin and inhibin in comparison of DNT1 group. While there was a significant increase in leptin, IGF-2, activin A, insulin, LH, testosterone, FSH, and GnRH levels compared with DNT1 (P < 0.05). A significant decrease in both the testis weights and diameters was observed in diabetic male rats compared to controls (P < 0.05). While silk cocoon treatment improved gonadal weight, the diameter of tunica albuginea, and seminiferous tubules as long as increased in numbers of spermatocytes and Sertoli-Leydig cells. Spermatogonia, spermatocyte, spermatid, spermatozoid, Sertoli cells, and Leydig cell count were significantly lower in the DNT1 group in comparison with the control group, while all groups receiving the highest dose of SC800 mg/kg daily had a higher count of cells than the DNT1 group. Conclusion It seems that silk cocoon treatment decreases the effects of diabetes on hypothalamic-pituitary–gonadal axis.