Plant volatiles guide host location and oviposition in the codling moth, Cydia pomonella. This study analyzed volatiles from walnut (Juglans regia) and apple (Malus domestica), identifying 44 and 38 compounds, respectively, to explore differences in oviposition preference and olfactory responses. Female moths exhibited different oviposition preference index (OPI) and electroantennogram (EAG) responses to the two fruits. Among the detected volatiles, geranyl acetate not only elicited stronger EAG responses in females from the walnut-associated population but also increased their OPI. Single-sensillum recordings further confirmed that neurons in this population were more readily activated by geranyl acetate. In contrast, cis-3-hexenyl acetate had no effect. Olfactory genes, including cpomSNMP1, cpomOR59, cpomOR35, cpomOR2a, and cpomOR5, were upregulated in the walnut-associated population, potentially explaining these olfactory differences. This study advances our understanding of the genetic basis underlying female codling moth oviposition behavior and volatile recognition and provides insights for developing more suitable oviposition attractants from plant volatiles, thereby facilitating the control of codling moth in orchards planted with different host species.