Background: Hydrogen sulfide (H2S) is a new type of gas neurotransmitter discovered in recent years. It plays an important role in various physiological activities. The hypothalamus paraventricular nucleus (PVN) is an important nucleus that regulates gastric function. This study aimed to clarify the role of H2S in the paraventricular nucleus of the hypothalamus on the gastric function of rats.Methods: An immunofluorescence histochemistry double-labelling technique was used to determine whether cystathionine-beta-synthase (CBS) and c-Fos neurons are involved in PVN stress. Through microinjection of different concentrations of NaHS, physiological saline (PS), D-2-Amino-5-phosphonovaleric acid (D-AP5), and pyrrolidine dithiocarbamate (PDTC), we observed gastric motility and gastric acid secretion.Results: c-Fos and CBS co-expressed the most positive neurons after 1 h of restraint and immersion, followed by 3 h, and the least was at 0 h. After injection of different concentrations of NaHS into the PVN, gastric motility and gastric acid secretion in rats were significantly inhibited and promoted, respectively (p < 0.01); however, injection of normal saline, D-AP5, and PDTC did not cause any significant change (p > 0.05). The suppressive effect of NaHS on gastrointestinal motility and the promotional effect of NaHS on gastric acid secretion could be prevented by D-AP5, a specific N-methyl-D-aspartic acid (NMDA) receptor antagonist, and PDTC, an NF-κB inhibitor.Conclusion: There are neurons co-expressing CBS and c-Fos in the PVN, and the injection of NaHS into the PVN can inhibit gastric motility and promote gastric acid secretion in rats. This effect may be mediated by NMDA receptors and the NF-κB signalling pathway.