The storage mite,Tyrophagus putrescentiae, found worldwide in many habitats, is an important pest of edible mushrooms. Excessive chemical spraying for pest control has been linked to environmental pollution, health risks, insecticide resistance development, and food safety. Host resistance can be sustainable and cost-effective and provide effective and economical pest control. Previous studies have reported that the oyster mushroomPleurotus ostreatushas evolved effective defense mechanisms againstT. putrescentiaeattack, but the underlying mechanism remains unclear. Here we report that a lectin gene fromP. ostreatusmycelia,Polec2, induced fungal resistance to mite grazing.Polec2belongs to a galectin-like lectin classification, encoding a protein with β-sandwith-fold domain. Overexpression ofPolec2inP. ostreatusled to activation of the reactive oxygen species (ROS)/mitogen-activated protein kinases (MAPKs) signaling pathway, salicylic acid (SA), and jasmonate (JA) biosynthesis. The activation resulted in bursts of antioxidant activities of catalases (CAT), peroxidases (POD), superoxide dismutases (SOD), and increased production of SA, JA, jasmonic acid-isoleucine (JA-Ile) and jasmonic acid methyl ester (MeJA), accompanied by reducedT. putrescentiaefeeding and suppressed its population. We also provide an overview of the phylogenetic distribution of lectins across 22 fungal genomes. Our findings shed light on the molecular mechanisms ofP. ostreatus’ defense against the mite predator and will be useful in investigating the molecular basis of fungi-fungivory interactions and gene mining for pest-resistance genes.