Abstract:[Objective] Medium-temperature Daqu is the saccharifying, fermentative, and aroma-producing agent used in the brewing of strong-flavor Baijiu. The current quality evaluation of medium-temperature Daqu mainly depends on sensory and physicochemical characteristics. Previous studies have employed amplicon sequencing to preliminarily explore the relationship between the quality grade of Daqu and the composition of microbial community. However, little is known about the impacts of microbial community functions on the quality of Daqu. [Methods] We employed metagenomics to analyze and compare microbial community composition and potential functions of medium-temperature Daqu with different quality grades. We then analyzed the activities and the gene abundance of key enzymes involved in lactate and acetate metabolism. [Results] The fungal community structure was different between two Daqu samples. Higher relative abundance of filamentous fungi, represented by Aspergillus (21.6%), Rasamsonia (6.8%), Paecilomyces (5.0%), and Talaromyces (4.4%), were observed in the first-grade Daqu (Grade_1). The relative abundance of genes involved in environmental information processing and cellular processes in Grade_1 was significantly higher than that in the second-grade Daqu (Grade_2). In Grade_1, Hymenobacter and Aspergillus contributed to the higher gene abundance of alpha-amylase, resulting in significantly higher liquefying activity. In Grade_2, Lichtheimia (11.8%), Rhizopus (13.4%), and Pichia (7.2%), and lactic acid bacteria such as Companilactobacillus, Weissella, and Limosilactobacillus had higher relative abundance. Moreover, the genes involved in metabolism such as carbohydrate metabolism, energy metabolism, and nucleotide metabolism had higher relative abundance in Grade_2. The more abundant lactic acid bacteria in Grade_2 was conducive to the higher gene abundance of alcohol dehydrogenase and Saccharopolyspora, Staphylococcus, Aspergillus, and Thermoactinomyces provided a higher gene abundance of carboxylesterase, enhancing the fermentative and esterifying activities, respectively. Furthermore, more lactic acid bacteria in Grade_2 might produce more lactate dehydrogenase to degrade lactic acid, and the higher gene abundance of acetate metabolism-related enzymes could promote acetate catabolism, which led to the significantly lower acidity in Grade_2 than in Grade_1. [Conclusion] We analyzed the microbial community functions of medium-temperature Daqu with different quality grades at the gene level and explored the potential microorganisms contributing to the differences in enzyme activities and acidity. The findings can underpin the establishment of a comprehensive Daqu quality evaluation system and the rational regulation of community functions.