As the initiation point of digestion, the oral microbiome is important in maintaining oral and systemic health. However, the composition of oral microbial communities and the influence of weaning on the oral microbiota of donkey foals remains poorly characterized. The present study used buccal swab samples to determine the changes in oral microbial communities occurring at the time of weaning. A total of 20 oral swab samples were collected from two groups: preweaning donkey foals (PreW group, n = 10) and postweaning donkey foals (PostW group, n = 10). The donkey oral microbiome was analyzed by 16S rRNA gene sequencing using Illumina MiSeq. This study is the first report of the donkey oral microbiome in association with weaning. Compared to the preweaning donkeys, the oral bacteria diversity in the postweaning donkeys was increased, with a higher Simpson index. Changes in the composition of the oral microbiota between the PreW and PostW groups were observed in the present study. At the phylum level, the relative abundance of Firmicutes and Myxococcota was significantly greater in the PostW than in the PreW group. At the genus level, the Gemella, unclassified_o__Lactobacillales, and Lactobacillus were increased in the postweaning donkeys. The donkeys’ oral microbial functions were predicted using PICRUSt, and the functions related to carbohydrate metabolic pathways were significantly enriched in the oral microbiome in the PostW donkeys. In summary, the current study provides a deeper insight into the oral microbiota changes during the weaning period, and the influence of weaning together with the documented changes in diversity and composition will help us to obtain a better understanding of their long-term health impact within the oral cavities of donkey foals. However, a major limitation of the present study was that the samples were obtained from different animals in the PreW and PostW groups, which may have resulted in variability among the different individuals. Further investigation is needed to monitor the shift in oral microbes in the same individuals during the weaning period.