The study aimed to clarify the potential immune-related targets and mechanisms of Qingyihuaji Formula (QYHJ) against pancreatic cancer (PC) through network pharmacology and weighted gene co-expression network analysis (WGCNA). Active ingredients of herbs in QYHJ were identified by the TCMSP database. Then, the putative targets of active ingredients were predicted with SwissTargetPrediction and the STITCH databases. The expression profiles of GSE32676 were downloaded from the GEO database. WGCNA was used to identify the co-expression modules. Besides, the putative targets, immune-related targets, and the critical module genes were mapped with the specific disease to select the overlapped genes (OGEs). Functional enrichment analysis of putative targets and OGEs was conducted. The overall survival (OS) analysis of OGEs was investigated using the Kaplan-Meier plotter. The relative expression and methylation levels of OGEs were detected in UALCAN, human protein atlas (HPA), Oncomine, DiseaseMeth version 2.0 and, MEXPRESS database, respectively. Gene set enrichment analysis (GSEA) was conducted to elucidate the key pathways of highly-expressed OGEs further. OS analyses found that 12 up-regulated OGEs, including CDK1, PLD1, MET, F2RL1, XDH, NEK2, TOP2A, NQO1, CCND1, PTK6, CTSE, and ERBB2 that could be utilized as potential diagnostic indicators for PC. Further, methylation analyses suggested that the abnormal up-regulation of these OGEs probably resulted from hypomethylation, and GSEA revealed the genes markedly related to cell cycle and proliferation of PC. This study identified CDK1, PLD1, MET, F2RL1, XDH, NEK2, TOP2A, NQO1, CCND1, PTK6, CTSE, and ERBB2 might be used as reliable immune-related biomarkers for prognosis of PC, which may be essential immunotherapies targets of QYHJ.