Abstract Background Nowadays, there has been extensive interest in cellular senescence in gastrointestinal diseases. However, the pathological mechanism of cellular senescence in UC and its involvement in colonic immune characteristics remain enigmatic. Therefore, we aimed to investigate the contribution of cellular senescence-related signatures to the colonic immune landscape in UC based on bioinformatics combined machine learning strategy. Methods Three gene sets of UC were selected from the Gene Expression Omnibus database, including two training sets and one testing set. We identified cellular senescence-associated differentially expressed genes (DEGs) in UC and performed functional enrichment analysis. Afterwards, signature genes were determined by machine learning algorithms including least absolute shrinkage and selection operator (LASSO) regression, support vector machine recursive feature elimination (SVM-RFE), and artificial neural network (ANN). Furthermore, distinct immune microenvironment abnormalities in UC were comprehensively explored, and the correlation between the signature genes and the colonic immune landscape of UC was also evaluated. Based on the signature genes, we clustered UC samples into distinct subtypes by consensus clustering analysis. Finally, we performed validation of the signature genes in dextran sulfate sodium salt (DSS)-induced colitis. Results 41 cellular senescence-associated DEGs in UC were identified by intersecting DEGs with the cellular senescence-associated genes from the CellAge database, which were associated with cellular senescence and immune pathways. Following that, seven signature genes were determined by the machine learning method of LASSO regression, SVM-RFE, and ANN, comprising CXCL1, MMP9, CYR61, BAG3, PEX19, RPS6KA6, and ETS2, which were also validated in the testing set. Furthermore, we obtained the most correlated pairs of UC signature genes-immunocytes and found these signature genes were highly corelated with neutrophils and activated CD4+ memory T cells. Additionally, the expression profiling of human leukocyte antigen genes and immune checkpoints were also analyzed. Subsequently, two molecular subtypes related to senescence that exhibit significantly different immune characteristics were identified. Finally, the mRNA levels of the signature genes were confirmed in DSS-induced colitis, which were congruent with results gained from the datasets. Conclusion In summary, the result has emphasized the essential function of cellular senescence-associated genes in controlling the immune microenvironment for UC. The exploration of the etiopathogenesis of UC through cellular senescence is anticipated to lead to novel advancements in disease diagnosis and potential treatments.