In the present study, twenty-four Duroc × Landrance × Yorkshire (initial body weight (BW) of 21·82 (sem 2·06) kg) cross-bred pigs were used to determine whether dietary vitamin D supplementation could confer protection against viral infections through the retinoic acid-inducible gene I (RIG-I) signalling pathway in pigs. Experimental treatments were arranged in a 2 × 2 factorial manner with the main effects of immune challenge (control v. porcine rotavirus (PRV) challenge) and dietary concentrations of vitamin D (200 and 5000 IU; where 1 IU of vitamin D is defined as the biological activity of 0.025 mg of cholecalciferol). The pigs were fed a diet containing 200 or 5000 IU vitamin D in the first week of the study period. On day 8, the pigs were orally dosed with 4 ml of Dulbecco's modified Eagle's medium/Ham's F-12 medium containing PRV or essential medium (control). Serum samples were collected on day 8 (pre-challenge), and 6 d after the PRV challenge, the pigs were killed to evaluate intestinal morphology and tissue gene expression following the last blood collection. Pigs challenged with PRV had decreased BW gain (P< 0·01), feed intake (P< 0·01), villus height (P< 0·01), faecal consistency (P< 0·05), and serum 1,25-dihydroxyvitamin D concentration (P< 0·01) and increased (P< 0·01) serum IL-2, IL-6 and interferon (IFN)-β concentrations. Vitamin D supplementation mitigated these effects. The mRNA expression of RIG-I (P< 0·01), IFN-β promoter stimulator 1 (P< 0·01), IFN-β (P< 0·01) and interferon-stimulated gene 15 (ISG15) (P< 0·01) was up-regulated by the PRV challenge and vitamin D supplementation in the intestine. In conclusion, vitamin D supplementation could activate the RIG-I signalling pathway and thus alleviate the negative effects caused by PRV challenge.