The present invention discloses an Albizia chinensis extract used in the preparation of a drug for the treatment of gastric ulcers. Specifically, it discloses an Albizia chinensis (Osbeck) Merr extract and its preparation method including the stems bark of Albizia chinensis was successively grounded, extracted, concentrated and purificated, as well as a pharmaceutical composition comprising the Albizia chinensis extract. Through pharmacological test, it has been demonstrated that, the Albizia chinensis extract showed strong inhibition activity against proton pumps, and it can be used for the treatment of gastric ulcers, chronic gastritis and other acid-related diseases, and its anti-ulcer effect is significant, quick, safe and reliable.