Background: In this study, we mainly aimed to explore the correlation between galloflavin and NLRP3 and its effect on colorectal cancer.Methods: NLRP3 was overexpressed in SW480 cells; LPS + ATP was used to mimic the inflammatory microenvironment. Wound healing assay and Transwell assay were utilized to detect cell migration and invasion abilities; CCK-8 assay was performed to detect cell viability alterations; colony formation assay was conducted to detect colony formation ability; Western blot was used to detect the levels of NLRP3, ASC, C-Myc, and P21. SW480 cells were pretreated with high-dose and low-dose galloflavin, followed by observation of their effects on cell metastasis and invasion. NLRP3 was knocked out in SW480 to construct the SW480-NLRP3−/− cell line, followed by high-dose galloflavin treatment and subsequent observation of cell metastasis and invasion abilities. Small molecule–protein docking and pull-down assay were performed to confirm the targeting relationship between galloflavin and NLRP3. After constructing a tumor-bearing mice model, galloflavin was intragastrically administered, followed by detection of tumor growth, expression of NLRP3 and ASC by immunohistochemistry, and tumor histopathology by H&E staining.Results: After NLRP3 overexpression and LPS/ATP induction in SW480, the cell migration and invasion abilities were significantly enhanced, and cell viability was also enhanced. The activation of NLRP3 could promote the malignant behavior of colorectal cancer cells in the inflammatory microenvironment. Galloflavin treatment could significantly attenuate the malignant behavior of SW480 in the inflammatory microenvironment and inhibit the migration and invasion capabilities of SW480. The knockout of NLRP3 inhibited the effect of galloflavin, which did not significantly change the migration and invasion abilities. Molecular docking and pull-down assay revealed a targeted binding relationship between galloflavin and NLRP3 and that galloflavin is bound to NLRP3 not ASC protein. Moreover, galloflavin could inhibit tumor growth and decrease the expression of NLRP in tumor-bearing mice.Conclusion: In this study, we found that NLRP3 could promote the migration and invasion of colorectal cancer cells in the inflammatory microenvironment. Galloflavin could inhibit the malignant behavior of colorectal cancer cells by targeting NLRP3.