The purpose of this study was to assess the influence and the clinical effectiveness of the short stature homeobox 2 (SHOX2) and ras association domain family 1A (RASSF1A) genes by tissue sampling through ultrasound endoscopy-guided fine-needle aspiration (EUS-FNA) as auxiliary diagnostic tools for pancreatic cancer (PC). Methylation markers were detected in 96 patients using real-time fluorescence quantitative PCR (qPCR), and the performance of this diagnostic assay was compared with CA19-9, CEA, and puncture fluid-based exfoliative cytology using receiver operating characteristic curve (ROC) analysis. The PC group exhibited higher methylation rates for SHOX2, RASSF1A, and the combined assay of both genes compared to the control group (95.7 % vs. 54.0 %, 78.3 % vs. 36.0 %, and 73.9 % vs. 16.0 %, P < 0.05). The areas under the ROC curve (AUC) for CA19-9, CEA, liquid-based exfoliative cytology, SHOX2, RASSF1A, the combination of SHOX2 and RASSF1A, the combination assay with CEA, CA19-9, and liquid-based exfoliative cytology were 0.827, 0.692, 0.767, 0.770, 0.732, 0.870, 0.870, 0.933, and 0.900, respectively. Therefore, the methylation assay based on the combined SHOX2 and RASSF1A genes in EUS-FNA puncture fluid is more effective than using a single gene, liquid-based exfoliative cytology, or intravenous tumor markers for diagnosing PC. Combining the conventional marker CA19-9 enhances the diagnostic value, making it a promising approach to complement histology and cytology.