IntroductionSix species of alfalfa commonly found in northern China were collected in the present study.MethodsThe chemical composition and epiphytic microbial communities during the ensiling were analyzed; and their effects on fermentation quality and silage bacterial communities were assessed. The effects of physicochemical characteristics of alfalfa on the bacterial community were also investigated in terms of nutritional sources of microbial growth and reproduction.Results and discussionThe results showed that the chemical composition was significantly different in various alfalfa varieties, yet, the dominant genera attached to each variety of alfalfa was similar, except for pantoea (p<0.05). After ensiling, both the fermentation quality and microbial community changed obviously (p<0.05). Specifically, ZM2 had lower pH and ammonia nitrogen (NH3-N) content but higher LA content than other varieties of alfalfa silage. Beneficial bacteria such as Lentilactobacillus and Lactiplantibacillus were predominant in ZM2, which accounted for the higher fermentation quality. Significant correlations between the chemical composition of silage, fermentation quality and bacterial communities composition were observed. Moreover, variations in bacteria community structure during the fermentation of alfalfa were mainly influenced by water-soluble carbohydrates (36.79%) and dry matter (21.77%).ConclusionIn conclusion, this study revealed the influence of chemical composition on microbial community and fermentation quality, laying the groundwork for future studies on high-quality silage.