The prevention and control of odor gas generated from kitchen waste are significant missions in research on environmental pollution. Because of the high complexity and variability of kitchen waste, the development of a suitable technique with high sensitivity for the accurate detection of odor gas is an urgent and core task in this frontier field. Here, a technique combining surface-enhanced Raman spectroscopy (SERS) and artificial intelligence (AI) is explored for detecting malodorous components in the leachate of kitchen waste. Initially, 1706 SERS spectra were collected from synthetic kitchen waste under various fermentation parameters. Several AI algorithms were used to classify three levels of odor intensity based on SERS spectra, among which the Random Forest Classifier algorithm model showed a high prediction accuracy of 86.5%. Then, by integrating Raman data, the AI algorithm model identified hydrogen sulfide (H2S) and ammonia (NH3) as the dominant malodorous components in the odor gas. Finally, the structural characteristics of the microbial communities are investigated. With the help of Raman's intensities of malodorous components, many more insights into microorganisms in the fermentation process are revealed, which has important research value in the prevention and controlling of odor gas generated from kitchen waste. Furthermore, the microbial metabolic pathways of sulfur and nitrogen are discussed here. This SERS-AI-based novel technique not only has a broad potential for odor pollution but also could be applied to another complicated biochemical system with functional bacteria.