The present experiment was conducted to evaluate the effect of enzymatically treated Artemisia annua L. (EA) on intestinal digestive function and immune capacity in weaned pigs. Firstly, a total of 300 21-day-old piglets were randomly allotted to five groups, including CON, EA1, EA2, EA3, and EA4 groups (basal diet supplemented with 0, 0.5, 1, 2, 4 g/kg EA, respectively). At 50 days of age, the results showed that pigs in the EA3 group presented significant improvements (p < .05) of growth performance and health status when compared with those of the CON group. According to the results above, we considered 2 g/kg EA as the optimal dose for pig diets. Therefore, we selected 12 pigs from the CON and EA3 groups (n ¼ 6) at 51 days of age for further investigation in vivo. Compared with the CON group, EA3 group significantly increased (p < .05) small intestinal length of pigs, enhanced (p < .05) the activities of amylase, trypsin and Na þ-K þ-ATPase and the concentrations of glucose transporter in both jejunum and ileum. EA3 group had lower (p < .05) concentrations of interleukin 1b, interleukin 6 and tumour necrosis factor a in the jejunum and higher (p < .05) concentrations of interleukin 10, secretory immunoglobulin A and immunoglobulin G in the ileum of pigs than the CON group. These results demonstrated that EA provided a dietary nutritional means to improve intestinal function of weaned pigs and 2 g/kg was the optimal dose for weaned pigs in the present study. HIGHLIGHTS Dietary supplementation with 2 g/kg enzymatically treated Artemisia annua L. increased growth performance and nutrient digestibility, decreased the incidence of diarrhoea in weaned pigs. The optimal dose of enzymatically treated Artemisia annua L. in weaned pigs in the current study was 2 g/kg. Enzymatically treated Artemisia annua L. inclusion increased the digestive function of weaned pigs. Diet supplemented with enzymatically treated Artemisia annua L. reduced the inflammation and enhanced the immunity of weaned pigs.