Homeostasis of gut microbiota is a critical contributor to growth and health in weaned piglets. Fish oil is widely reported to benefit health of mammals including preventing intestinal dysfunction, yet its protective effect during suckling-to-weaning transition in piglets remains undetermined. Low (30 g/d) and high (60 g/d) doses of n-3-rich fish oil were supplemented in sows from late gestation to lactation. Serum indicators and gut microbiota were determined to evaluate the effects of maternal fish oil on growth performance, immunity and diarrhea of piglets. DHA and EPA in the colostrum as well as serum of suckling and 1-week post-wean piglets were significantly and linearly increased by maternal supplementation of fish oil (P < 0.05). IGF1 and T3 in nursing and weaned piglets were significantly elevated by maternal fish oil (P < 0.05), and the increase of IGF1 was concerning the dosage of fish oil. Colostrum IgG, plasma IgG, IgM in suckling piglets, IgG, IgM and IgA in weaned piglets were significantly increase as maternal replenishment of fish oil increased (P < 0.05). Additionally, cortisol was significantly reduced in weaned pigs (P < 0.05), regardless of dosage. 16S rRNA sequencing revealed that α-diversity of fecal microbiota in nursery piglets, and fecal Lactobacillus genus, positively correlated with post-weaning IgA, was significantly increased by high dosage. Collectively, maternal fish oil during late pregnancy and lactation significantly promoted growth, enhanced immunity, and reduced post-weaning diarrhea in piglets, therefore facilitated suckling-to-weaning transition in piglets, which may be partially due to the altered gut microbial community.