IntroductionA better understanding of the microbiota community in donkey foals during the weaning transition is a prerequisite to optimize gut function and improve feed efficiency. The objective of the present study was to investigate the dynamic changes in fecal microbiota in donkey foals from pre-to post-weaning period.MethodsA total of 27 fecal samples of donkey foals were collected in the rectum before morning feeding at pre-weaning (30 days of age, PreW group, n = 9), dur-weaning (100 days of age, DurW group, n = 9) and post-weaning (170 days of age, PostW group, n = 9) period. The 16S rRNA amplicon sequencing were employed to indicate the microbial changes during the weaning period.ResultsIn the present study, the cessation of breastfeeding gradually and weaning onto plant-based feeds increased the microbial diversity and richness, with a higher Shannon, Ace, Chao and Sobs index in DurW and PostW than in PreW (p 50.5%) and Bacteroidota (>29.5%), and the predominant anaerobic fungi and archaea were Neocallimastigomycota and Euryarchaeota. The cellulolytic related bacteria including phylum Firmicutes, Spirochaetota and Fibrobacterota and genus norank_f_F082, Treponema, NK4A214_group, Lachnospiraceae_AC2044_group and Streptococcus were increased from pre-to post-weaning donkey foals (p