There is currently a lack of effective olfaction-based techniques to control diamondback moth (DBM) larvae. Identifying behaviorally active odorants for DBM larvae and exploring their recognition mechanisms can provide insights into olfaction-based larval control strategies. Through the two-choice assay, (E,E)-2,6-farnesol (farnesol) was identified as a compound exhibiting significant attractant activity toward DBM larvae, achieving an attraction index of 0.48 ± 0.13. PxylGOBP1 and PxylGOBP2, highly expressed in the antennae of DBM larvae, both showed high affinity toward farnesol. RNAi technology was used to knock down PxylGOBP1 and PxylGOBP2, revealing that the attraction of DBM larvae to farnesol nearly vanished following the knockdown of PxylGOBP2, indicating its critical role in recognizing farnesol. Further investigation into the PxylGOBP2-farnesol interaction revealed the importance of residues like Thr9, Trp37, and Phe118 in PxylGOBP2's binding to farnesol. This research is significant for unveiling the olfactory mechanisms of DBM larvae and developing larval behavior regulation techniques.