In conclusion, dioscin improves pyroptosis in LPS-induced mice mastitis by activating AMPK/Nrf2 and inhibiting the NF-κB signaling pathway. The gene discussed is NFE2L2; the disease is mastitis.