Obesity, characterized by excessive body fat accumulation due to energy metabolism imbalance, has emerged as a significant risk factor for male infertility. Icariin (ICA), a principal constituent of Epimedium, has demonstrated potential in improving obesity and enhancing testicular spermatogenesis. This study aimed to elucidate the role and underlying mechanisms of ICA in mitigating obesity-induced male infertility through the suppression of inflammation and insulin resistance. Utilizing a high-fat diet (HFD)-induced obese mouse model, we investigated ICA's effects on pyroptosis, insulin resistance, and cell-related genes and proteins, such as Caspase-1, NLRP3, IL-1β, IL-18, and GSDMD. Our in vitro studies on TM3 cells confirmed that ICA could ameliorate inflammation and pyroptosis induced by LPS + Nig and insulin resistance induced by insulin. We discovered that ICA significantly attenuated body weight changes, pyroptosis, insulin resistance, and testicular spermatogenic dysfunction induced by HFD. Moreover, ICA effectively mitigated inflammation and pyroptosis in TM3 cells induced by LPS + Nig and insulin resistance. The study concluded that by addressing the underlying mechanisms, ICA holds promise as a treatment for obesity-related male infertility through inflammation, insulin resistance, and metabolic dysfunction. The study calls for further investigation of the molecular mechanisms and clinical applicability of ICA, particularly with regard to its potential to alter the gut microbiota, which may contribute to improved metabolic and reproductive health. This study reveals that ICA suppresses NLRP3 inflammasome-activated pyroptosis and insulin resistance, reduces inflammatory mediator expression, enhances insulin sensitivity, promotes testosterone synthesis and secretion, restores testicular interstitial cell function, and ameliorates testicular spermatogenesis in obese mice.