Peptic ulcer disease (PUD) refers to acid-induced injury of the digestive tract, occurring mainly in the stomach (gastric ulcer; GU) or duodenum (duodenal ulcer; DU). We conducted a large-scale cross-ancestry meta-analysis of PUD combining genome-wide association studies with four Japanese and two European studies (52,032 cases and 905,344 controls), and discovered 25 novel loci highly concordant across ancestries. Based on these loci, an examination of similarities and differences in genetic architecture between GU and DU demonstrated that GU shared the same risk loci as DU, although with smaller genetic effect sizes and higher polygenicity than DU, indicating higher heterogeneity of GU. H. pylori (HP)-stratified analysis found an HP-related host genetic locus, marking its role in HP-mediated PUD etiology. Integrative analyses using bulk and single-cell transcriptome profiles highlighted the genetic factors of PUD to be enriched in the highly expressed genes in stomach tissues, especially in somatostatin-producing D cells. Our results provide genetic evidence that gastrointestinal cell differentiations and hormone regulations are critical in PUD etiology.