Abstract When infecting plants, fungal pathogens secrete cell wall degrading enzymes (CWDEs) that break down cellulose and hemicellulose, the primary components of plant cell walls. Some fungal CWDEs contain a unique domain, named the carbohydrate binding module (CBM), that facilitates their access to polysaccharides. However, little is known about how plants counteract pathogen degradation of their cell walls. Here, we show that the rice cysteine-rich repeat secretion protein OsCBMIP binds to and inhibits xylanase MoCel10A of the blast fungus pathogen Magnaporthe oryzae , interfering with its access to the rice cell wall and degradation of rice xylan. We found binding of OsCBMIP to various CBM1-containing enzymes, suggesting it has a general role in inhibiting the catalytic activities of fungal enzymes. OsCBMIP is localized to the apoplast, and its expression is strongly induced in leaves infected with M. oryzae . Remarkably, knockdown of OsCBMIP reduced rice defense against M. oryzae , demonstrating that inhibition of CBM1-containing fungal enzymes by OsCBMIP is crucial for rice defense. We also identified additional CBMIP-related proteins from Arabidopsis thaliana and Setaria italica , indicating that a wide range of plants counteract pathogens through this mechanism. Summary Plants have evolved various activity-inhibiting proteins as a defense against fungal cell wall degrading enzymes (CWDEs), but how plants counteract the function of fungal enzymes containing carbohydrate binding modules (CBMs) remains unknown. Here, we demonstrate that OsCBMIP, a member of the cysteine-rich repeat secretion protein family, interacts with fungal CBM1. OsCBMIP binding to CBM1 of a blast fungal xylanase blocks access to cellulose, resulting in the inhibition of xylanase enzymatic activity. Our study provides significant insights into plant countermeasure against CWDEs in the apoplastic space during plant–fungal pathogen interactions. It also reveals a molecular function of the DUF26 domain widely distributed in plant proteins.