The aim of this study was to introduce HPV-associated and HPV-independent histologic classifications to analyze prognostic factors and develop a prognostic nomogram for patients with penile squamous cell carcinoma (PSCC). Data of 1502 PSCC patients between 2010 and 2020 were accessed from the SEER database, and the patients were randomly divided into a training set and a validation set. Independent risk factors for PSCC patients prognosis were analyzed by using univariate and multivariate COX proportional hazards regression, and was used for the construction of the nomogram, and the predictive performance of the model was evaluated by C-index, calibration curve and ROC curve. Kaplan-Meier analysis was applied to explore the impact of HPV-related factors on patient survival, while propensity score matching (PSM) and inverse probability treatment weighting (IPTW) techniques were used to balance other confounding factors like individual clinical and pathological factors, and to evaluate the differences in overall survival (OS) and cause-specific survival (CSS) between subgroups. The results indicated that histologic type, Grade classification, T/M stage, surgical methods and chemotherapy were independent risk factors affecting OS and CSS in PSCC patients. In addition, age and marital status were significantly associated with OS, while lymph node metastasis was an independent prognostic factor for CSS, the validation results of the model showed that the nomogram had a superior predictive performance compared with the American Joint Committee on Cancer staging system. In addition, subgroup analyses prior to and after IPTW and PSM adjustments showed that HPV-associated group had better OS and CSS than HPV-independent group. Our study developed and validated a nomogram using a novel histologic classification and achieved satisfactory results, which can better help clinicians to predict the prognosis of penile squamous cell carcinoma patients.