Competitive endogenous RNAs (ceRNAs) and tumor-infiltrating immune cells play essential roles in colorectal cancer (CRC) tumorigenesis. However, their prognostic role in elderly patients with CRC is unclear. Gene expression profiles and clinical information for elderly patients with CRC were downloaded from The Cancer Genome Atlas. Univariate, LASSO, and multivariate Cox regression analyses were utilized for screening key ceRNAs and prevent overfitting. A total of 265 elderly patients with CRC were included. We constructed a novel ceRNA network consisting of 17 lncRNAs, 35 miRNAs, and 5 mRNAs. We established three prognosis predictive nomograms based on four key ceRNAs (ceRNA nomogram), five key immune cells (immune cell nomogram), and their combination (ceRNA-immune cell nomogram). Among them, the ceRNA-immune cell nomogram had the best accuracy. Furthermore, the areas under the curve of the ceRNA-immune cell nomogram were also significantly greater than the TNM stage at 1 (0.818 vs. 0.693), 3 (0.865 vs. 0.674), and 5 (0.832 vs. 0.627) years. Co-expression analysis revealed that CBX6 was positively correlated with activated dendritic cells (R = 0.45, p < 0.01), whereas negatively correlated with activated mast cells (R =− 0.43, p < 0.01). In conclusion, our study constructed three nomograms to predict prognosis in elderly patients with CRC, among which the ceRNA-immune cell nomogram had the best prediction accuracy. We inferred that the mechanism underlying the regulation of activated dendritic cells and mast cells by CBX6 might play a crucial role in tumor development and prognosis of elderly patients with CRC.Supplementary InformationThe online version contains supplementary material available at 10.1007/s12672-023-00742-y.