Plants deploy receptor-like kinases and nucleotide-binding leucine-rich repeat receptors to confer host plant resistance (HPR) to herbivores1. These gene-for-gene interactions between insects and their hosts have been proposed for more than 50 years2. However, the molecular and cellular mechanisms that underlie HPR have been elusive, as the identity and sensing mechanisms of insect avirulence effectors have remained unknown. Here we identify an insect salivary protein perceived by a plant immune receptor. The BPH14-interacting salivary protein (BISP) from the brown planthopper (Nilaparvata lugensStål) is secreted into rice (Oryza sativa) during feeding. In susceptible plants, BISP targetsO.satviaRLCK185 (OsRLCK185; hereafterOsis used to denoteO.satvia-related proteins or genes) to suppress basal defences. In resistant plants, the nucleotide-binding leucine-rich repeat receptor BPH14 directly binds BISP to activate HPR. Constitutive activation ofBph14-mediated immunity is detrimental to plant growth and productivity. The fine-tuning ofBph14-mediated HPR is achieved through direct binding of BISP and BPH14 to the selective autophagy cargo receptorOsNBR1, which delivers BISP toOsATG8 for degradation. Autophagy therefore controls BISP levels. InBph14plants, autophagy restores cellular homeostasis by downregulating HPR when feeding by brown planthoppers ceases. We identify an insect saliva protein sensed by a plant immune receptor and discover a three-way interaction system that offers opportunities for developing high-yield, insect-resistant crops.