Our results showed that (i) high glucose and sodium palmitate lead to ferroptosis in pancreatic β cells of T2DM rats and MIN6 cells; (ii) GSPE increased the expression of GPX4 and XCT, effective ferroptosis inhibitors that can improve T2DM; and (iii) GSPE significantly reduced ferroptosis and improved T2DM and β-cell viability through the Nrf2 pathway, in vivo and in vitro. The gene discussed is SLC7A11; the disease is type 2 diabetes mellitus.