Immunoediting is defined as a process whereby tumour cells develop the capacity to escape immune cell recognition. Accumulating evidence suggests that cancer stem-like cells (CSCs) have an enhanced capacity to interact with the immune system. The expression of CSCs and immune cell-associated markers has been demonstrated to change with disease progression from premalignant lesions to invasive cancer. The present study investigated the expression of putative CSC and immune cell-associated markers in different stages of progression from dysplasia to invasive malignancy in rectal lesions. Immunohistochemistry was performed for the CSC markers Lgr5 and SOX2 and the immune-associated markers CD8, Foxp3 and PD-L1 in 79 cases of endoscopically-excised rectal lesions, ranging from low grade adenoma (LG) to invasive adenocarcinoma (AdCa). CD8 and Foxp3 expression significantly increased with advances in disease progression [AdCa vs. LG: Odds ratio (OR) 4.33; 95% confidence interval (CI), 1.16-16.3; P=0.03 and OR, 40.5; 95% CI, 6.57-249.6; P<0.0001, respectively]. An increase in programmed death-ligand 1 (PD-L1) expression was also observed with disease progression (OR, 24.0; 95% CI, 4.23-136.2; P=0.0003). The expression of sex determining region Y-box 2 (SOX2) did not correlate with disease progression, although an elevated expression was observed in areas with high grade dysplasia. Increased PD-L1 expression may be a mechanism by which tumour cells evade immune recognition, facilitating tumour cell invasion in rectal cancer. The expression of SOX2 in areas with high grade dysplasia may indicate the de-differentiation of tumour cells, or the activation of migration pathways for invasion.