Abstract Ground‐nesting wild bees provide essential pollination services in agroecosystems, but they are jeopardized by intensive agricultural management. To mitigate such negative impacts, agri‐environment schemes have been implemented. While the success of enhancing floral food resources is relatively well studied, the role of agri‐environmental schemes in providing suitable nesting habitat remains underexplored. We studied the effectiveness of meadow extensification according to the Swiss agri‐environment scheme in promoting nesting of ground‐nesting bees. Using a paired design, we quantified their nests during four rounds (March–June) in pairs of nine randomly selected extensively (i.e. no fertilizer input, postponed first mowing) and nine intensively managed meadows with similar soil properties, slope, exposure and landscape context. Nest numbers and vegetation characteristics were surveyed in areas of 250 m2. Vegetation properties were also assessed in 0.5 × 0.5 m plots around nest locations and randomly selected locations without nests within each meadow to assess their role as drivers of nesting incidence (nest presence/absence) at this plot scale. We found substantially higher nest numbers of ground‐nesting bees in extensively (mean ± SE per sampling round = 46.8 ± 14.2) compared to intensively managed meadows (0.8 ± 0.3; no nests in three of nine intensively managed meadows). Extensively managed meadows harboured nests of several dominant crop pollinator species, including aggregations of, for example, Lasioglossum malachurum contributing to high nest densities in some of them. Number of nests was negatively related to grass cover and vegetation height, which were lower in extensively compared to intensively managed meadows. Plot‐level nesting incidence increased with bare ground and moss cover, and decreased with grass cover. Synthesis and applications. Our study shows that extensively managed meadows are better nesting habitats for ground‐nesting bees than intensively managed meadows, if reduced management intensity is associated with altered vegetation characteristics such as reduced grass cover and vegetation height, and small‐scale availability of bare ground, driving these effects. This highlights that maintaining and promoting extensive management of meadows can promote ground‐nesting wild bees, including dominant crop pollinators, not only by enhancing floral resources but also by improving nesting opportunities in agroecosystems.