Rotavirus infection is a major cause of gastroenteritis and 600,000 infants die from this infection each year. This study shows that treatment with bacterial flagellin can protect mice against subsequent infection with rotavirus and promote the clearance of this virus from chronically infected mice. Flagellin induced protective immunity by activating both Toll-like receptor 5 (TLR5) and NOD-, LRR- and CARD-containing 4 (NLRC4), leading to the production of interleukin-22 (IL-22) and IL-18, respectively. These cytokines seemed to operate via distinct antiviral mechanisms; IL-22 induced protective gene expression in intestinal epithelial cells, whereas IL-18 upregulated a pro-apoptotic pathway. Co-treatment with IL-18 and IL-22 recapitulated the protective effects of flagellin, suggesting that these cytokines could have antiviral applications in the clinic.