The testicles and sperm are extremely susceptible to inflammation and oxidative stress. Although Zhibai Dihuang Pill (ZDP) has been reported to treat various infertilities including male infertility induced by Ureaplasma urealyticum (UU) infection, its mechanism is still poorly understood. This study is aimed at clarifying the underlying mechanism of ZDP to protect against UU-infected male infertility. We found that UU-infected infertile rats exhibited weight loss, reduced food intake, and decreased sperm count and vitality. The administration of ZDP improved the general state and sperm motility of rats. In addition, UU infection led to spermatogenesis disorders, impaired secretory function and blood-testis barrier (BTB) of Sertoli cells, and elevated inflammation and oxidative stress. As expected, ZDP suppressed inflammation and oxidative stress to alleviate spermatogenesis disorders. Our research showed that ZDP could improve spermatogenesis disorders and testicular function primarily through the mitogen-activated protein kinase (MAPK) signaling pathway. ZDP exerts its anti-inflammatory and antioxidant effects via the MAPK signaling pathway, thus playing an important role in ameliorating spermatogenesis failure and testicular dysfunction.