Chronic colorectal inflammation has been associated with colorectal cancer (CRC); however, its exact molecular mechanisms remain unclear. The present study aimed to investigate the effect of Toll-like receptor 9 (TLR9) on the development of colitis-associated CRC (CAC) through its regulation of the NF-κB signaling pathway. By using a CAC mouse model and immunohistochemistry, the present study discovered that the protein expression levels of TLR9 were gradually upregulated during the development of CRC. In addition, the expression levels of TLR9 were revealed to be positively correlated with NF-κB and Ki67 expression levels. In vitro, inhibiting TLR9 expression levels using chloroquine decreased the cell viability, proliferation and migration of the CRC cell line HT29, and further experiments indicated that this may occur through downregulating the expression levels of NF-κB, proliferating cell nuclear antigen and Bcl-xl. In conclusion, the findings of the present study suggested that TLR9 may serve an important role in the development of CAC by regulating NF-κB signaling.