Three types of zaopei (fermented grain) of xiaoqu light-flavor baijiu (XQZP), daqu light-flavor baijiu (DQZP), and strong-flavor baijiu (SFZP) at the end of fermentation and their dominant lactic acid bacteria were systematically compared and analyzed in this study. The results showed that these three types of zaopei differed significantly in acidity, reducing sugar content, and ethanol content, and that the main factors influencing their microbial community were acidity and lactic acid. The diversity and contents of flavor substances were significantly higher in SFZP than in DQZP and XQZP. Additionally, there was a strong correlation between dominant lactic acid bacteria and flavor substances in all three zaopei, but the correlation between fungi and flavor substances was higher than that between bacteria and flavor substances. Differential gene analysis revealed that the microbial activities followed the order of SFZP > DQZP > XQZP. The KEGG enrichment analysis indicated that the differential genes from different zaopei were enriched in different metabolic pathways. Furthermore, various microorganisms in 3 types of zaopei contained different functional genes, of which fungi mainly contained genes responsible for the synthesis of ethanol and acetic acid, while lactic acid bacteria mainly contained genes responsible for the synthesis of lactic acid. In XQZP, L. helveticus was dominant lactic acid bacteria prominent in acetic acid tolerance and lactic acid production; in DQZP, L. acetotolerans was remarkable in its tolerance to lactic acid, acetic acid, ethanol and lactic acid production; and in SFZP, A. jinshanensis was superior in acetic acid tolerance and production. Taken together, this study reveals the mechanism underlying flavor differences among three types of baijiu and provides valuable references for the development and utilization of baijiu microbial resources.