Diabetes mellitus (DM) is a chronic metabolic disease, where the predominant pathogenesis is pancreatic β‑cells dysfunction or injury. It has been well established that inflammation leads to a gradual exhaustion of pancreatic β‑cell function with decreased β‑cell mass likely resulting from pancreatic β‑cells apoptosis or death. Vitexin, a major bioactive flavonoid compound in plants has numerous pharmacological properties, including antioxidant, anti‑inflammatory and antimyeloperoxidase. Whether vitexin can protect pancreatic β‑cells against lipopolysaccharide (LPS)‑induced pro‑inflammatory cytokine production and apoptosis has received little attention. The present study investigated the potential effects of vitexin on LPS‑induced pancreatic β‑cell injury and apoptosis. It was revealed that apoptosis and damage induced by LPS in islet tissue of rats and INS‑1 cells was significantly decreased in response to vitexin treatment. In addition, pretreatment with vitexin decreased the levels of the pro‑inflammatory cytokines tumor necrosis factor‑α and high mobility group box 1 (HMGB1) in LPS‑induced rats. Further experiments demonstrated that vitexin pretreatment suppressed the activation of P38 mitogen‑activated protein kinase signaling pathways in LPS‑induced INS‑1 cells. In conclusion, the results indicated that vitexin prevented LPS‑induced islet tissue damage in rats, and INS‑1 cells injury and apoptosis by inhibiting HMGB1 release. Therefore, the present study provided clear evidence indicating that vitexin may be a viable therapeutic strategy for the treatment of DM.