Yongchuan douchi (YCDC) is a traditional Chinese condiment famous for its distinct flavor and texture. This study utilized high-throughput sequencing to analyze the microbial community changes during YCDC fermentation and investigate the relationship between its physicochemical properties, flavor compounds, and microorganisms. The sequencing results revealed that Staphylococcus, Bacillus, Leuconostoc, Weissella, Streptophyta, Nocardiopsis, Aspergillus, Penicillium, Starmerella, and Zygosaccharomyces were the dominant bacteria during the YCDC fermentation process. The free amino acid (FAAs), glutamic acid (Glu), asparagine (Asp), and organic acid (citric and succinic acid) levels increased gradually throughout fermentation. Additionally, 29 key flavor compounds were identified, with lipids, alcohols, aldehydes, and acids significantly affecting the flavor profile. Network graph analysis demonstrated positive correlations between Staphylococcus, Escherichia_Shigella, Brevibacterium, and 1-octene-3-ol, ethyl isobutyrate, and benzaldehyde, respectively, contributing to light, fruity, and floral aromas. Moreover, bacterial genera exhibited stronger potential correlations with flavor compounds than fungal genera. These findings enhance the understanding of microbial community succession in YCDC and offer a theoretical basis for flavor strain selection.