Lactic acid bacteria metabolism affects the composition of volatile organic compounds (VOCs) in alfalfa silage, which results in differences of odor and quality. The aim of this study was to reveal the effects of commercial
Lactobacillus plantarum
(CL), screened
Lactobacillus plantarum
(LP), and screened
Pediococcus pentosaceus
(PP) on quality, microbial community, and VOCs of alfalfa silage based on volatile metabolomics and metagenomics. The results showed that the LP and PP groups had higher sensory and quality grades, and the dominant bacteria were
Lactiplantibacillus plantarum
and
Pediococcus pentosaceus
. The main VOCs in alfalfa silage were terpenoids (25.29%), esters (17.08%), and heterocyclic compounds (14.43%), and esters such as methyl benzoate, ethyl benzoate, and ethyl salicylate were significantly increased in the LP and PP groups (
P
< 0.05). Correlation analysis showed that terpenoids, esters, and alcohols with aromatic odors were positively correlated with
Lactiplantibacillus plantarum
and
Pediococcus pentosaceus
. Microbial functions in carbohydrate and amino acid metabolism, biosynthesis of secondary metabolites, and degradation of aromatic compounds were significantly enriched. In conclusion, the addition of lactic acid bacteria can increase the aromatic substances in silage and further improve silage odor and quality.