The purpose of this study was to identify a vital gene signature that has prognostic value for pancreatic cancer based on gene expression datasets from the Cancer Genome Atlas and Gene Expression Omnibus. A total of 34 genes were obtained by the univariate analysis, which were significantly associated with the overall survival of PC patients. After further analysis, Anillin (ANLN) and Histone H1c (HIST1H1C) were identified and considered to be the most significant prognostic genes among the 34 genes. A prognostic model based on these two genes was constructed, and successfully distinguished pancreatic cancer survival into high-risk and low-risk groups in the training set and testing set. Subsequently, independent predictive factors, including the age, margin condition and risk score, were then employed to construct the nomogram model. The area under curve for the nomogram model was 0.826 at 0.5 years and 0.726 at 1 year, and the C-index of the nomogram model was 0.664 higher than the others variables alone. These findings have indicated that high expression of ANLN and HIST1H1C predicted poor outcomes for patients with pancreatic cancer. The nomogram model based on the expression of two genes could be valuable for the guidance of clinical treatment.