Agricultural by-products have been identified as potential feed resources in animal production. The present study investigated the effects of cassava residue (CR) or fermented CR (FCR) on antioxidant capacity, immunity, gut barrier functions, and lipid metabolism in pigs. A total of 120 healthy Huanjiang mini-piglets were assigned into three groups, including control group (basal diet), CR group (basal diet + 5% CR), and FCR group (basal diet + 5% FCR). The experiment lasted for 30 days. The results showed that, dietary CR or FCR supplementation increased the jejunal catalase (CAT, P = 0.063) and glutathione peroxidase (GSH-Px, P < 0.05) levels and hepatic superoxide dismutase (SOD, P < 0.05) level while decreased (P = 0.077) ileal malondialdehyde (MDA) level, when compared with the control group. Dietary CR supplementation increased intestinal SOD and hepatic GSH-Px levels, whereas decreased jejunal and hepatic MDA levels (P < 0.05). Dietary CR supplementation increased the levels of secretory immunoglobulin A (sIgA) in the intestine and liver, as well as jejunal interleukin (IL)-10, ileal tumor necrosis factor (TNF)-α, and hepatic interferon (IFN)-γ, whereas dietary CR or FCR supplementation decreased the jejunal IL-1β level and increased hepatic IL-10 level (P < 0.05). In the intestinal microbiota analysis, dietary CR or FCR supplementation enhanced the colonic α-diversity and ileal Actinobacteria abundance, whereas decreased ileal Verrucomicrobia and colonic Tenericutes abundances (P < 0.05). In addition, dietary FCR supplementation increased Firmicutes and decreased Bacteroidetes abundances in the ileum and colon, whereas CR supplementation increased Escherichia-Shigella and decreased Terisporobacter abundances in the ileum (P < 0.05). Moreover, dietary CR or FCR supplementation up-regulated (P < 0.05) the gene expressions related to gut barrier functions of piglets. However, dietary CR supplementation showed negative impacts on hepatic lipid metabolism by up-regulating the expression of genes associated with fatty acid synthesis and triglyceride and lipid metabolism. In conclusion, dietary CR or FCR supplementation can maintain the health of piglets by increasing antioxidant capacity, gut barrier function, and altering the intestinal microbiota composition, but CR supplementation may increase the potential risk of abnormal lipid metabolism.