In order to develop a general model of aboveground net primary production (ANPP) of herbaceous communities in grazing systems that combine forested and open grasslands in temperate areas, biomass production and a set of biotic and abiotic variables were measured at four adjacent forest and grassland sites in Chile’s northern Patagonia for two consecutive growing seasons. At each site, one transect of 80 m long (40 m in open grassland and 40 m in forest) × 10 m wide was established. ANPP was significantly higher in open grasslands but no gradual change in biomass production was observed from inside the forest towards the open grassland. In open grasslands ANPP was spatially uniform but highly variable between years of contrasting weather conditions, whereas in forests it was more spatially heterogeneous and less variable over time. ANPP was highly correlated with cattle consumption. Structural equation models developed for the whole system confirm that ANPP was driven mainly by photosynthetically active radiation (PAR) and available nitrogen. However, we found important differences between forests and the adjacent open grasslands. In forests ANPP was enhanced by positive feedbacks between the amount of transmitted PAR through the canopy and soil nutrient input via cattle dung deposition. In open grasslands nitrogen availability appeared to be the main limiting factor but also influenced by weather conditions (dryer or wetter years). The coexistence of forests and grasslands patches, with different susceptibility of ANPP to meteorological and soil nutrient availability, highlights the importance of implementing an integrated silvopastoral system with lenga (Nothofagus pumilio [Poepp. & Endl.] Krasser) in northern Patagonia.