The fruiting bodies of Hericium erinaceus have been widely used for the treatment of dyspepsia, chronic gastric ulcers, and enervation. There remains a lack of data on the role of an ethanol extract from H. erinaceus (EEH) on ethanol-induced gastric ulcers. The ethanol-induced experimental gastric injury model was used to evaluate the gastroprotective activity of extracts. Ultra-high performance liquid chromatography-triple quadrupole--time of flight tandem mass spectrometry (UPLC-Triple-TOF-MS) analysis was used to identify the possible compounds present in EEH. Transcriptome sequencing(RNA-seq) and bioinformatics analyses were conducted to reveal the characteristics and molecular mechanism underlying EEH's protective effect of on gastric tissue injury. Administration of EEH at doses of 0.625, 1.25, and 2.5 g/kg body weight prior to ethanol ingestion dose--dependently inhibited gastric ulcers. EEH also significantly increased superoxide dismutase (SOD) activity and decreased malondialdehyde (MDA) content in the gastric tissue. Twelve compounds from EEH were identified including three diterpene compounds, two heteroterpene compounds, three isoindolinone compounds, one aromatic compound, N-(1-deoxy-d-fructos-1-yl)-l-valine, adenosine, and lumichrome. These compounds promote the inhibition of pathways involved in gastric ulcer formation. The RNA-seq results suggest that EEH indirectly protects the gastric tissue from injury by regulating the cell cycle and biological functions, up-regulating several signal molecules, or activating several proteasome functions. It was concluded that EEH represents a potential therapeutic option to reduce the risk of gastric ulceration.