Ammonia (NH3) and hydrogen sulfide (H2S) are the main odor components in the composting process. Controlling their emissions is very important to reduce environmental pollution and improve the quality of composting products. This study explored the effects of functional bacteria on nitrogen and sulfur metabolism in the composting process of food waste (FW) by adding ammonia-oxidizing bacteria (AOB, A treatment), sulfur-oxidizing bacteria (SOB, S treatment), and combined AOB and SOB (AS treatment), respectively. The key bacterial species involved in nitrogen and sulfur transformation were identified, and the intrinsic mechanisms by which ammonia oxidation drove sulfur oxidation during composting were deciphered. Compared with control treatment (CK), the combined addition of functional microorganisms increased the maximum of soxB gene abundance by 1.72 times, thus resulting in the increase in the SO42- content by 44.00 %. AS treatment decreased the cumulative H2S emission and total sulfur (TS) loss by 40.24 % and 34.69 %, respectively, meanwhile lowering NH3 emission. Correlation network analysis showed that the simultaneous addition of AOB and SOB enhanced the correlation between microorganisms and sulfur oxidation genes, and Acinetobacter, Aeribacillus, Brevibacterium and Ureibacillus might be involved in the ammonia oxidation-promoted sulfur oxidation process. In summary, the optimized inoculation strategy of AOB and SOB could drive biological transformation of nitrogen and sulfur by regulating microbial community, ultimately reducing odor emissions and improving sulfur conservation.