The invention relates to the field of drug formulae, in particular to a traditional Chinese medicine for treating gastric ulcer. The traditional Chinese medicine is characterized by being prepared from the following raw materials in parts by weight: 77-87 parts of oroxylum indicum, 41-51 parts of greek valerian, 25-35 parts of radix ceratostigmae, 33-43 parts of roundleaf dutchmanspipe root, 25-35 parts of semen aesculi, 18-28 parts of fingered citron, 21-31 parts of bulbiferous stonescrop, 19-29 parts of amomum cardamomum, 14-24 parts of allium macrostemon, 20-30 parts of alpinia katsumadai, 13-23 parts of adiantum, 16-26 parts of semen cuscutae, 10-20 parts of dioscorea cirrhosa, 37-47 parts of jasminum grandiflorum, 24-34 parts of polygonum orientale fruit, 26-36 parts of pterocephalus hookeri, 8-18 parts of perfoliote knotweed herb, 6-16 parts of dwarf galangal rhizome and 8-18 parts of raspberries. The raw materials are mixed, soaked with water, decocted and subjected to residue removal to obtain filter liquor. The traditional Chinese medicine has a remarkable treatment effect on epigastric pain, gastric ulcer and duodenal ulcer, can improve the gastric motility and recover normal metabolism of the stomach, is long in action time, short in treatment course, quick-acting, safe and free of toxic and side effects, and can be widely applied to clinical treatment of the gastric ulcer.