In this study, bamboo leaf flavonoids (BLF) was used as an additive to explore its protective effect on hydrogen peroxide (H2O2)-induced pyroptosis of bovine mammary epithelial cells (BMECs). In this experiment, the concentration of BLF was 80 μg·mL-1 and the concentration of H2O2 was 800 μmol·L-1. The BMECs without BLF treatment were set as the control group, and the treatment groups were BLF treatment group, H2O2 treatment group, BLF and H2O2 co-treatment group. The expression of pyroptosis-related genes and related proteins and the fluorescence intensity of apoptosis-related microparticle-like protein(ASC) were detected by RT-qPCR, Western blot, immunofluorescence and flow cytometry. The results showed that compared with the control group, 800 μmol·L-1 H2O2 treatment of BMECs for 8 h significantly increased the pyroptosis of bovine mammary epithelial cells (P < 0.05). After H2O2 treatment, the relative expression levels of NLRP3, ASC, GSDMD, IL-18, IL-1β genes which related to pyroptosis genes were significantly increased (P < 0.05), especially the expression of NLRP3, indicating that H2O2 significantly increased the pyroptosis of BMECs. Compared with the H2O2 treatment group, BLF could reduce the pyroptosis level of normal cells, significantly reduce the mRNA up-regulation trend of NLRP3, Nek7, ASC, GSDMD, IL-18, IL-1β, and significantly alleviate the increase of intracellular pyroptosis protein expression of NLRP3, ASC, Nek7, pro-caspase1, caspase1 p20, GSDMD-N, IL-18 and IL-1β induced by H2O2 (P < 0.05), and the fluorescence intensity of ASC was significantly reduced (P < 0.05). In summary, H2O2 significantly up-regulated the expression levels of pyroptosis-related genes and proteins such as NLRP3, ASC, Caspase-1, GSDMD, IL-1β, and IL-18, and induced pyroptosis in bovine mammary epithelial cells. In conclusion, BLF reduced the level of inflammatory factors by reducing the expression of NLRP3 inflammasome pathway proteins and genes, thereby alleviating the pyroptosis of dairy cow mammary epithelial cells.