Oak-barrel fermentation is used in white wine production to enhance aroma and flavor complexity. However, the dynamics of microbial communities and their impact on the formation of flavor compounds during barrel fermentation remain unclear. This study investigated the changes in dissolved oxygen concentrations, microbial communities, and volatile compounds during Sauvignon Blanc wine fermentation in various oak barrels (new and two-year-old Francois Freres and new Taransaud) and stainless-steel tanks. We found that oak barrels had higher dissolved oxygen levels than steel tanks, with new barrels exhibiting higher levels than the old ones during fermentation. The dominant bacterial genera across all the vessels during the fermentation included Ralstonia, Pantoea, Gluconobacter, and Mesorhizobium, whereas the dominant fungal genera were Saccharomyces, Aspergillus, Alternaria, and Aureobasidium. The fermentation environment altered the microbial composition as the fermentation progressed in various vessels. Compared with steel tanks, difference in microbial composition between oak barrels was less significant. The new oak barrels increased the levels of esters, alcohols, and acids in the wine, while only minor differences were observed between old barrels and steel tanks. Correlation analysis showed that Ralstonia, Gluconobacter, Mesorhizobium, and Saccharomyces were positively correlated with the production of wine volatiles. Structural equation modeling indicated the interactions between dissolved oxygen, microbial communities, and wine aromas. The impact of dissolved oxygen on fungal communities during fermentation differed significantly between new and old oak barrels, indirectly influencing aroma. Conversely, in stainless-steel tanks, dissolved oxygen weakly influenced the bacterial and fungal communities, with the influence on wine aroma primarily dependent on the fungal communities. These findings provide valuable insights for optimizing the Sauvignon Blanc wine fermentation in oak barrels