Colorectal cancer is the fourth leading cause of cancer-related death worldwide. Notably, abnormalities in intestinal bacteria may contribute to the initiation or progression of colorectal cancer. Lipopolysaccharide (LPS), a bacterial endotoxin, is elevated in patients with colorectal cancer. The present study investigated the protective effects of dandelion root extracts and taraxasterol (TS; a major pharmacologically active compound in dandelion root extracts) on LPS-induced colorectal cancer cell viability, as well as the underlying mechanisms. Cell viability was assessed by MTT assay, and protein and gene expression levels were determined by western blotting and quantitative PCR. It was revealed that LPS at a low dose (0.5 µg/ml) significantly promoted the viability of human colorectal cancer cells but did not affect normal colon epithelial cells. The addition of dandelion root extracts (0.1-1 mg/ml) or TS (0.05-1 µg/ml) was able to reverse the LPS-induced increase in colorectal cancer cell viability and colony formation. Mechanistically, dandelion root extracts or TS may inhibit the LPS-promoted toll-like receptor 4 (TLR4)/NFκB-p65 pathway and transcription levels of pro-inflammatory genes (TNFα, IL4 and IL6). Compared with normal colon epithelial cells, human colorectal cancer cells had higher expression levels of angiotensin-converting enzyme 2 (ACE2) and transmembrane serine protease 2 (TMPRSS2), which could be further enhanced by LPS treatment but this was reversed by co-incubation with dandelion root extracts or TS. In addition, suppression of the TLR4/NFκB-p65 pathway with CLI095 significantly reversed the stimulatory effect of LPS on the expression levels of ACE2 and TMPRSS2, whereas TNFα (10 ng/ml) markedly induced the expression levels of ACE2 and TMPRSS2. In conclusion, the present study suggested that dandelion root extracts and TS could be used as prevention strategies for reversing bacteria-driven colorectal cancer cell viability.