Yellow stem borer (YSB), Scirpophaga incertulas, is a major rice pest causing significant yield losses worldwide. We investigated how volatile organic compounds (VOCs) released by the rice variety TN1, both before and after infestation, as well as by its companion weeds, Echinochloa colona and Echinochloa crus-galli, influence the behavior of YSB in host selection, recognition, and establishment. Olfactometry bioassays showed that uninfested TN1 plant VOCs attracted YSB more than those from YSB-infested rice plants and weeds. Changes in the VOC profile of TN1 during 24-48 h post-YSB infestation revealed that these postalighting compounds may deter YSB oviposition. Xylene, cymene, 1,2,3,4-tetrahydro naphthalene, dodecanol, and tetradecanol could be possible YSB attractants based on metabolomics, olfactometry, and GC-EAD studies. This work illuminates rice plant-YSB chemical interactions and VOCs dynamic function in attraction and defense processes. These findings provide a foundation for developing VOC-based pest management strategies to mitigate yield losses in rice farming.