The invention relates to a traditional Chinese medicine composition, particularly a Chinese patent medicine for treating chronic gastritis and gastroduodenal ulcer and a preparation method thereof. The traditional Chinese medicine is prepared from the following components in parts by weight: 50-200 parts of Mangnolia officinalis, 150-300 parts of costus root, 50-200 parts of cuttlebone, 50-150 parts of amomum fruit, 50-150 parts of corydalis tuber, 50-150 parts of dried ginger, 100-200 parts of hyacinth bletilla, 50-150 parts of Chinese date and 60-130 parts of licorice root. The Chinese patent medicine for treating chronic gastritis and gastroduodenal ulcer has the functions of regulating the flow of qi, warming the middle-jiao and alleviating pain. The Chinese patent medicine for treating chronic gastritis and gastroduodenal ulcer is mainly used for treating stomach cold and qi stagnation of epigastralgia, including swelling, pain, anorexia, acid regurgitation, irregular excretion, light texture of tongue, thin and white tongue coat, and weak pulses.