Soil-dwelling pests inflict considerable economic damage in agriculture but are hard to control. A promising strategy to reduce pest pressure on crops is to increase the plant diversity in agroecosystems. This approach, however, demands a sound understanding of species' interactions, which is widely lacking for subterranean herbivore-plant systems. Here, we examine the effects of plant diversification on wireworms, the soil-dwelling larvae of click beetles that threaten crops worldwide. We conducted a field experiment employing plant diversification by adding either wheat or a mix of six associated plants (grasses, legumes, and forbs) between rows of maize to protect it from Agriotes wireworms. Wireworm feeding behavior, dispersal between crop and associated plants, as well as maize damage and yield were examined. The former was assessed combining molecular gut content and stable isotope analysis. The pests were strongly attracted by the associated plants in August, when the crop was most vulnerable, whereas in September, shortly before harvest, this effect occurred only in the plant mix. In maize monoculture, the larvae stayed in the principal crop throughout the season. Larval delta13C signatures revealed that maize feeding was reduced up to sevenfold in wireworms of the vegetationally diversified treatments compared to those of the maize monoculture. These findings were confirmed by molecular analysis, which additionally showed a dietary preference of wireworms for specific plants in the associated plant mix. Compared to the monoculture, maize damage was reduced by 38% and 55% in the wheat and plant mix treatment, which translated into a yield increase of 30% and 38%, respectively. The present findings demonstrate that increasing the plant diversity in agroecosystems provides an effective insurance against soil pests. The underlying mechanisms are the diversion of the pest from the principle crop and a changed feeding behavior. The deployment of diverse mixes of associated plants, tailored to the specific preferences of the soil herbivores, provides a promising strategy for managing subterranean pests while maintaining crop yield.