The invasive box‐tree moth Cydalima perspectalis causes damage to horticultural box trees (Buxus spp.) in private gardens and parks in Europe and defoliation of large areas of European native box trees Buxus sempervirens, which grow in the understorey of deciduous forests. In some parts of their distribution area, wild native box trees are infected by the box rust Puccinia buxi, a fungus which does not occur in the native range of C. perspectalis. We examined whether the infection of P. buxi deters grazing by C. perspectalis in 31 wild box‐tree stands in forests in north‐western Switzerland and south‐western Germany. On average, 82.4% of the box trees were infested by P. buxi (among‐site variation 20%–100%), or 18.5% of their leaves. Linear mixed‐effect (LME) models revealed that the percentage of rust‐infected leaves was influenced by the local box‐tree density and the slope aspect of the forest site. 9.5% of the leaves showed grazing damage by C. perspectalis. LME showed that the percentage of leaves with grazing damage was affected by the elevation of the site and the percentage of rust‐infected leaves. The effect of box rust infection on food choice and larval performance (survival and growth rate) was examined in two experiments. In food‐choice tests, larvae of C. perspectalis did not show any preference for uninfected or rust‐infected box‐tree leaves and consumed similar amounts of leaf tissue of either type. However, when larvae were reared on leaves with three different degrees of P. buxi‐infection (and uninfected leaves as control), both survival and growth rate decreased with increasing degree of rust infection. This indicates that larval performance of C. perspectalis is reduced by the box rust. In the case of an outbreak of C. perspectalis, however, larvae may indiscriminately defoliate wild box trees.