The invention discloses a traditional Chinese medicine for treating the stomach ulcer and the duodenal ulcer. The traditional Chinese medicine is prepared from the following medicinal materials in parts by weight: kadsura coccinea, belladonna herbs, sterculia nobilis smith, fleshfingered citron flowers, white mume flowers, greater celandine, white peony roots, poria cocos, cuttlebone, atractylodes rhizomes, dried orange peels, cortex magnoliae officinalis, medicated leaven, endothelium corneum gigeriae galli, ginger, cassia twigs, rhizoma corydalis, medicinal evodia fruits, radix gentianae, raw malt, oyster, astragalus membranaceus, dandelions, smoked plums, Chinses angelica, rhizoma alismatis, ligusticum wallichii, Chinese date, dried rhizomes of rehmannia, cortex moutan, heterophylly falsestarwort roots, combined spicebush roots, frankincense, myrrh, costus roots, rhizoma coptidis, nutgrass galingale rhizomes, radix salviae miltiorrhizae, pseudo-ginseng, fried hyacinth beans, common bletilla tubers, aspongopus, cinnamon, haws, szechwan chinaberry fruits, Chinese thorowax, ficus cariolosa lindl, ardisia affinis hemsl, roots and leaves of ananas comosus, carum carvi caraway, knotweed rhizomes, Sichuan hazels, aristolochia impressinervis, common canscora herbs, fruits of dahurian roses, bitter citrus immature flowers, zanthoxylum dissitum, Chinese enkianthus, tangut dragonhead and licorice roots. Clinical tests prove that the traditional Chinese medicine disclosed by the invention can safely and effectively treat the stomach ulcer and the duodenal ulcer.