Helicobacter pylori (H. pylori) virulence factors, particularly the cagA and vacA genotypes, play important roles in the pathogenic process of gastrointestinal disease. The cagA and vacA genotypes of 87 H. pylori strains were determined by PCR and sequencing. The EPIYA and CM motif patterns were analyzed and related to clinical outcomes. We examined the associations between the virulence genes of H. pylori and gastrointestinal diseases in Shandong, and the results were analyzed via the chi-square test and logistic regression model. Overall, 76 (87.36%) of the strains carried the East Asian-type CagA, with the ABD types being the most prevalent (90.79%). However, no significant differences were observed among the different clinical outcomes. The analysis of CagA sequence types revealed 8 distinct types, encompassing 250 EPIYA motifs, including 4 types of EPIYA or EPIYA-like sequences. Additionally, 28 CM motifs were identified, with the most prevalent patterns being E (66.67%), D (16.09%), and W-W (5.75%). Notably, a significant association was discovered between strains with GC and the CM motif pattern D (P < 0.01). With respect to the vacA genotypes, the strains were identified as s1, s2, m1, m2, i1, i2, d1, d2, c1, and c2 in 87 (100%), 0 (0), 26 (29.89%), 61 (70.11%), 73 (83.91%), 14 (16.09%), 76 (87.36%), 11 (12.64%), 18 (20.69%), and 69 (79.31%), respectively. Specifically, the vacA m1 and c1 genotypes presented a significantly greater prevalence in strains from GC compared to CG (P < 0.05). Following adjustment for age and sex, the vacA c1 genotype demonstrated a notable association with GC (OR = 5.174; 95% CI, 1.402-20.810; P = 0.012). This association was both independent of and more pronounced than the correlations between vacA m1 and GC. CagA proteins possessing CM motif pattern D were more frequently observed in patients with GC (P < 0.01), implying a potentially higher virulence of CM motif pattern D than the other CM motif patterns. Moreover, a strong positive association was identified between the vacA c1 genotype and GC, indicating that the vacA c1 genotype is a robust risk indicator for GC among male patients aged ≥55 years in Shandong.