Agri-environmental management (AEM) is heralded as being key to biodiversity conservation on farmland, yet results of these schemes have been mixed, making their general utility questionable. We test with meta-analysis whether the benefits of AEM for species richness and abundance of plants and animals are determined by the surrounding landscape context. Across all studies (109 observations for species richness and 114 observations for abundance), AEM significantly increased species richness and their abundance. More specifically, we test the hypothesis that AEM benefits species richness and abundance (i.e. increases the difference between fields with and without AEM) more in simple than in complex landscapes. In croplands, species richness but not abundance was significantly enhanced in simple but not in complex landscapes. In grasslands, AEM effectively enhanced species richness and abundance regardless of landscape context. Pollinators were significantly enhanced by AEM in simple but not in complex landscapes in both croplands and grasslands. Our results highlight that the one-size-fits-all approach of many agri-environmental programmes is not an efficient way of spending the limited funds available for biodiversity conservation on farmland. Therefore, we conclude that AEM should be adapted to landscape structure and the species groups at which they are targeted.