Esters are vital flavor compounds in Chinese Nongxiangxing baijiu and greatly affect the quality of baijiu. Microbial communities inhabiting fermented grains (FGs) have a marked impact on esters. However, the specific microorganisms and their assembly patterns remain unclear. This study utilized high-throughput sequencing and a culture-based method to reveal ester-producing microorganisms. A total of 33 esters were detected, including 19 ethyl esters, 9 linear chain esters, and 2 branched chain esters. A correlation analysis indicated that the bacterial genus Lactobacillus (relative abundance in average: 69.05%) and fungal genera Pichia (2.40%), Aspergillus (11.84%), Wickerhamomyces (0.60%), Thermomyces (3.57%), Saccharomycopsis (7.87%), Issatchenkia (0.96%), and Thermoascus (10.83%) were dominant and associated with esters production and their precursors. The numbers of esters positively correlated with them were 1, 17, 3, 2, 1, 1, 1, and 1, respectively. The modified stochasticity ratio (MST) index and Sloan neutral model revealed that bacteria were predominantly governed by deterministic processes while fungal assemblies were more stochastic. Saturnispora silvae and Zygosaccharomyces bailii were isolated and identified with ester synthesis potential. PICRUSt2 analysis showed that fungi in FG had a high potential for synthesizing ethanol, while 14 enzymes related to esters synthesis were all produced by bacteria, especially enzymes catalyzing the synthesis of acyl-CoA. In addition, ester synthesis was mainly catalyzed by carboxylesterase, acylglycerol lipase and triacylglycerol lipase. These findings may provide insights into ester production mechanism and potential strategies to improve the quality of Nongxiangxing baijiu.