Gastric electrical pacing improved the Nrf2/HO-1 pathway and downregulated the phosphorylation of NF-κB. In the DM group, the levels of malonaldehyde and reactive oxygen species were elevated and superoxide dismutase was lowered, while gastric electrical pacing reduced the levels of malonaldehyde and reactive oxygen species and improved superoxide dismutase. This evidence concerns the gene HMOX1 and diabetes mellitus.