The increasing incidence of polycystic ovary syndrome (PCOS), will cause oxidative stress due to hyperglycemia, which subsequently elevates expression levels of proinflammatory cytokines, particularly tumor necrosis factor-alpha (TNF-α), contributing to a marked rise in infertility, observed in up to 89.6% cases. This study aimed to investigate the potential of Zingiber officinale var. rubrum in preventing PCOS. The in vivo laboratory-based experimental study utilized Rattus norvegicus, with 5 rats per group, divided into five experimental groups. The intervention consisted of Zingiber officinale var. rubrum extract for PCOS prevention. Statistical analysis was performed using one-way ANOVA. The silico study began with the preparation of activator ligands 6-Shogaol and 6-Gingerol, along with target receptors TNF-α and KEP1, NF-ҝβ. The in silico analysis showed that compounds from Zingiber officinale var. rubrum exhibited binding interactions with TNF-α at sites similar to the control ligands, showing greater affinity compared to interactions with SOD. The in vivo analysis showed that significantly elevated TNF-α expression levels and induced folliculogenesis abnormalities characteristic of PCOS (p < 0.05) compared to negative controls. The findings indicate that the bioactive compounds 6-Shogaol and 6-Gingerol present in Zingiber officinale var. rubrum may exert preventive effects against PCOS by modulating inflammatory pathways.