This study aimed to examine the protective effect of celastrol on testicular dysfunction in diabetic rats and the potential underlying mechanisms. All rats included in the study were divided into four groups: a control group treated with sodium citrate buffer and vehicle), a celastrol-treated control group, a streptozotocin (STZ)-induced diabetic group following insulin resistance, and a celastrol-treated diabetic group. Serum glucose, triglyceride, total cholesterol, high-density lipoprotein cholesterol, interleukin (IL)-1β, tumor necrosis factor-α, and testosterone levels were measured. In addition, the levels of testicular homogenate superoxide dismutase and malondialdehyde were assessed. Furthermore, testicular tissue relative toll-like receptor 4 (