A total of 64 pregnant Bama mini-pigs were used to investigate the effects of maternal probiotic or synbiotic supplementation during gestation and lactation on immune response, intestinal morphology, and microbiota community of offspring piglets. The sows were assigned randomly to one of four groups, control group (basal diet), antibiotic group (basal diet supplemented with 50 g/t virginiamycin), probiotic group (basal diet supplemented with 200 mL/d probiotic fermentation broth per pig), or synbiotic group (basal diet supplemented with 200 mL/d probiotic fermentation broth per pig + 500 g/t xylo-oligosaccharides) during pregnancy and lactation periods. After weaning, two piglets close to the average body weight (BW) per litter were selected and fed a basal diet. Eight piglets with similar BW were selected from each group for sample collection at 65 d-old. The results showed that plasma interleukin (IL)-2 and lipopolysaccharide concentrations were decreased (P < 0.05) in the probiotic group, while the immunoglobulin A (IgA) concentration in the probiotic and synbiotic groups was increased (P < 0.05), when compared with the control group. The jejunal IL-10, interferon-α, and secretory IgA (sIgA) concentrations were increased (P < 0.05) in the probiotic and synbiotic groups, as well as the ileal sIgA concentration in the probiotic group. The jejunal villus height (VH) and the ratio of VH to crypt depth were increased (P < 0.05) in the probiotic group, as well as the ileal VH in the synbiotic group. Furthermore, the piglets from the antibiotic group exhibited a lower microbiota diversity in the jejunum and ileum. The piglets from the synbiotic group had higher relative abundances of Actinobacteria, Bifidobacterium, Turicibacter, and Clostridium in the jejunum compared with the antibiotic group. Dietary probiotic treatment increased (P < 0.05) the relative abundance of Psychrobacter in the ileum compared with the antibiotic and control groups. Spearman's correlation analysis revealed that the relative abundances of Bifidobacterium, Clostridium, and Blautia in the jejunum and Psychrobacter in the ileum, were positively correlated with the alterations of immunoglobulin and cytokines. Collectively, these findings suggest that maternal interventions with probiotic or synbiotic are promising strategies for improving the immune response of offspring piglets by altering the gut microbiota.