Radioresistance is an important factor affecting the radiotherapy effect of colorectal cancer (CRC). Allicin is a versatile sulfur‐containing organic compound extracted from garlic (Allium sativum L.), which has many pharmacological effects. However, the effect of allicin on the sensitivity of CRC radiotherapy has not been confirmed. The present study is to observe the radiosensitivity effects of allicin and to explore its mechanism in CRC radiotherapy. The proliferation inhibition effects of allicin combined with X‐ray radiotherapy in HCT116 cells were measured by growth curve of cell and colony formation assays. The cell apoptosis was detected by Hoechst 33258 nucleus staining assay. The migration ability of cells was detected by Transwell chamber migration assay. The animal model of CRC was established in BALB/c mice via transplantation of CT26 cell, and the radiosensitization effect of allicin on CRC was detected in vivo. The mRNA expressions of NF‐κB, IKKβ, and IκBα were analyzed by reverse transcription‐polymerase chain reaction (RT‐PCR). The protein expressions of NF‐κB, p‐NF‐κB, IKKβ, p‐IKKβ, IκBα, and p‐IκBα were detected by western blotting. Our results showed that allicin improves the sensitivity of X‐ray radiotherapy in CRC, and its mechanism may be associated with inhibition of NF‐κB signaling pathway. These findings suggest that allicin may be used as a potential sensitizer for tumor radiotherapy in the clinic.