BackgroundAlthough the incidence of late-onset colorectal cancer (LOCRC) has decreased, the incidence of early-onset colorectal cancer (EOCRC) is still rising dramatically. Heterogeneity in the genomic, biological, and clinicopathological characteristics between EOCRC and LOCRC has been revealed. Therefore, the previous prognostic models based on the total CRC patient population might not be suitable for EOCRC patients. Here, we constructed a prognostic classifier to enhance the precision of individualized treatment and management of EOCRC patients.MethodsEOCRC expression data were downloaded from the Gene Expression Omnibus (GEO) and The Cancer Genome Atlas (TCGA) databases. The regulatory pathways were explored by gene set enrichment analysis (GSEA). The prognostic model was developed by univariate Cox-LASSO-multivariate Cox regression analyses of GEO samples. TCGA samples were used to verify the model. The expression and mutation profiles and immune landscape of the high-risk and low-risk cohorts were analyzed and compared. Finally, the expression and prognostic value of the model genes were verified by immunohistochemistry and qRT‒PCR analysis.ResultsThe cell cycle was identified as the most significantly enriched oncological signature of EOCRC. Then, a 4-gene prognostic signature comprisingMCM2, INHBA, CGREF1, andKLF9was constructed. The risk score was an independent predictor of overall survival. The area under the curve values of the classifier for 1-, 3-, and 5-year survival were 0.856, 0.893, and 0.826, respectively, in the training set and 0.749, 0.858, and 0.865, respectively, in the validation set. Impaired DNA damage repair capability (p< 0.05) and frequentPIK3CAmutations (p< 0.05) were found in the high-risk cohort. CD8 T cells (p< 0.05), activated memory CD4 T cells (p< 0.01), and activated dendritic cells (p< 0.05) were clustered in the low-risk group. Finally, we verified the expression of MCM2, INHBA, CGREF1, and KLF9. Their prognostic value was closely related to age.ConclusionIn this study, a robust prognostic classifier for EOCRC was established and validated. The findings may provide a reference for individualized treatment and medical decision-making for patients with EOCRC.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12885-023-11075-y.