Benzo[a]pyrene (BaP) is a contaminant that is generated in the environment through processes such as smoke, incomplete combustion of fossil fuels, vehicle exhaust emissions, entry into the body is through inhalation, and consumption of contaminated food. It is an omnipresent environmental pollutant with unavoidable exposure. BaP metabolites are observed in the male reproductive system, especially in the testes and epididymis of animals, and are responsible for reduced testicular and epididymal function. The protective effect of atorvastatin (ATV) on testicular damage was investigated previously. The aim of the present study was to investigate the protective effect of ATV on testicular toxicity induced by benzo[a]pyrene (BaP) during pregnancy in Wistar rats. This experimental laboratory study involved 40 adult rats, divided into seven groups and maintained under standard environmental conditions. The groups received different diets [control, corn oil, ATV (10 mg/kg), BaP (10 and 20 mg/kg), and ATV + BaP (10 and 20 mg/kg)] at gestation Days 7–16, orally. Male offspring were examined 10 weeks after birth. Testis and serum samples were collected, and testosterone level, malondialdehyde (MDA), and glutathione (GSH) were measured. Histological and immunohistochemical assays were performed under a light microscope. Statistical analysis was conducted using SPSS, with analysis of variance and Tukey tests to assess significant differences between groups. ATV significantly reduced MDA, a marker of lipid peroxidation and oxidative stress in rat testes following BaP administration. Treatment with ATV at doses of 10 mg/kg increased GSH levels, correcting disruptions in the antioxidant system caused by BaP. Testosterone concentration in rats treated with ATV and BaP substantially prevented the decrease induced by BaP. Histomorphometry revealed that ATV significantly prevented the detrimental effects of BaP on the thickness of spermatogenic epithelium and the diameter of seminiferous tubules. Under ATV treatment, testicular tissue histopathology improved, and spermatogenesis returned to a almost back to normal state. Caspase‐3 expression decreased, and apoptosis activity in testicular tissue improved under ATV treatment, indicating a positive effect of ATV in reducing apoptotic damage caused by BaP. In conclusion, exposure to BaP can induce oxidative stress‐related damage to testicular tissue, as evidenced by an increase in MDA levels, which ATV treatment can mitigate. Additionally, ATV enhances intracellular antioxidant GSH and protects the testes against BaP‐induced damage while increasing testosterone levels, which are reduced due to exposure to BaP.