Atractylodes macrocephala Koidz. (AM) is a Chinese herbal medicine that is widely used for treating gastrointestinal diseases. However, little research has focused on it as a single medicine for treating gastric ulcers. Honey‐bran stir‐frying is a characteristic method of concocting AM, so we speculated that AM is more effective after this preparation process. Analysis by ultra‐high‐performance liquid chromatography‐hybrid quadrupole‐Orbitrap high‐resolution mass spectrometry revealed changes in the chemical composition of raw Atractylodes (SG), bran‐fried Atractylodes (FG), and honey‐bran‐fried Atractylodes (MFG). MFG was superior to SG and FG in improving the pathological structure of gastric tissue in rats with acute gastric ulcers, reducing inflammatory cell infiltration in gastric tissue, and significantly reducing malondialdehyde while increasing superoxide dismutase and glutathione peroxidase, and reducing the damage caused by free radical accumulation in the gastric mucosa. In addition, MFG reduced the expression of matrix metalloproteinase‐9 (MMP‐9), an inhibitor of metalloproteinase‐1 (TIMP‐1) and nuclear factor kappa‐B (NF‐κB)proteins, inhibited inflammatory response, and regulated the degradation and rebalancing of the extracellular matrix. Fecal microbiota analysis also revealed that MFG normalized the intestinal flora to some extent. Our study shows that AM had a protective effect on rats with alcohol‐induced acute gastric ulcers before and after processing, and AM‐processed products were more effective than raw ones. Compared with MF, MFG had a higher rate of ulcer inhibition and a stronger anti‐inflammatory effect, and its mechanism of action was related to the NF‐κB‐MMP‐9/TIMP‐1 signaling pathway.