Gardeniae Fructus (GF) and carbonized GF (GFC) have been shown to exert a gastrointestinal protective effect and are frequently used in clinical practice for the treatment of hemorrhage and brown stool. In this study, we employed a combination of pharmacological methods and metabolomics in a rat model of ethanol-induced acute stomach ulcer to investigate the gastroprotective effect of GF and GFC water extracts and the potential mechanism involved in this process. The levels of nitric oxide (NO) and interleukin 6 (IL-6) in the plasma of rats were determined. The results showed that both GF and GFC reduced the ethanol-induced gastric lesions and expression of NO and IL-6 in these rats. Of note, 16 and 11 feature metabolites were filtered and identified in the GF and GFC groups, respectively. Both GF and GFC act by restoring the biosynthesis of valine, leucine, and isoleucine, and the metabolism of glycerophospholipids. Moreover, histological evaluation revealed that heat processing of GF to create GFC enhanced the gastric mucosa protective effect. Furthermore, heat processing converted the main pathway from alanine, aspartate, and glutamate metabolism, associated with GF, to histidine metabolism, associated with GFC. GF and GFC ameliorated gastric mucosa lesions in rats via reductions in NO production and inflammatory cytokine secretion, and the induction of prostaglandin E2.