An object of the present invention is to provide an agent for treating or preventing digestive ulcer that is effective even to ulcer of small intestine and others, for which gastric acid secretion inhibitors such as proton pump inhibitors are ineffective, and is superior to allopurinol in the efficaciousness and the safety. The pharmaceutical composition of the present invention comprising a non-purine xanthine oxidase inhibitor as the active ingredient is useful as an agent for treating or preventing ulcer that forms in digestive tracts by the attack of gastric acid, pepsin, stress, Helicobacter pylori bacteria, NSAID, etc. In particular, it is useful as an ulcer remedy heretofore unknown in the art as it is effective even for ulcer in small intestine for which gastric/duodenal ulcer remedies that inhibit gastric acid secretion such as proton pump inhibitors are ineffective.