Our previous study indicated that dietary xylooligosaccharide (XOS) supplementation improved feed efficiency, ileal morphology, and nutrient digestibility in laying hens. The objective of this study was to evaluate the mitigative effects of XOS on intestinal mucosal barrier impairment and microbiota dysbiosis induced by oxidized fish oil (OFO) in laying hens. A total of 384 Hy-Line Brown layers at 50 weeks of age were randomly divided into four dietary treatments, including the diets supplemented with 20 g/kg of fresh fish oil (FFO group) or 20 g/kg of oxidized fish oil (OFO group), and the OFO diets with XOS addition at 200 mg/kg (OFO/XOS200 group) or 400 mg/kg (OFO/XOS400 group). Each treatment had eight replicates with 12 birds each. The OFO treatment decreased (P < 0.05) the production performance of birds from 7 to 12 weeks of the experiment, reduced (P < 0.05) ileal mucosal secretory immunoglobulin A (sIgA) content, and increased (P < 0.05) serum endotoxin concentration, as well as downregulated (P < 0.05) mRNA expression of claudin-1 (CLDN1) and claudin-5 (CLDN5) in the ileal mucosa at the end of the experiment. Dietary XOS addition (400 mg/kg) recovered (P < 0.05) these changes and further improved (P < 0.05) ileal villus height (VH) and the villus height-to-crypt depth ratio (VCR). In addition, OFO treatment altered cecal microbial composition of layers, and these alterations were probably involved in OFO-induced ileal mucosal impairment as causes or consequences. Supplemental XOS remodeled cecal microbiota of layers fed the OFO diet, characterized by an elevation in microbial richness and changes in microbial composition, including increases in Firmicutes, Ruminococcaceae, Verrucomicrobia (Akkermansia), Paraprevotella, Prevotella_9, and Oscillospira, along with a decrease in Erysipelatoclostridium. The increased abundance of Verrucomicrobia (Akkermansia) had positive correlations with the improved ileal VH and ileal mucosal expression of CLDN1. The abundance of Erysipelatoclostridium decreased by XOS addition was negatively associated with ileal VH, VCR, ileal mucosal sIgA content, and the relative expression of zonula occludens-2, CLDN1, and CLDN5. Collectively, supplemental XOS alleviated OFO-induced intestinal mucosal barrier dysfunction and performance impairment in laying hens, which could be at least partially attributed to the modulation of gut microbiota.