On-farm anaerobic digestion (AD) of wastes and crops can potentially avoid greenhouse gas (GHG) emissions, but incurs extensive environmental effects via carbon and nitrogen cycles and substitution of multiple processes within and outside farm system boundaries. Farm models were combined with consequential life cycle assessment (CLCA) to assess plausible biogas and miscanthus heating pellet scenarios on dairy farms. On the large dairy farm, the introduction of slurry-only AD led to reductions in global warming potential (GWP) and resource depletion burdens of 14% and 67%, respectively, but eutrophication and acidification burden increases of 9% and 10%, respectively, assuming open tank digestate storage. Marginal GWP burdens per Mg dry matter (DM) feedstock codigested with slurry ranged from –637 kg CO2e for food waste to +509 kg CO2e for maize. Codigestion of grass and maize led to increased imports of concentrate feed to the farm, negating the GWP benefits of grid electricity substitution. Attributing grass-to-arable land use change (LUC) to marginal wheat feed production led to net GWP burdens exceeding 900 kg CO2e Mg−1 maize DM codigested. Converting the medium-sized dairy farm to a beef-plus-AD farm led to a minor reduction in GWP when grass-to-arable LUC was excluded, but a 38% GWP increase when such LUC was attributed to marginal maize and wheat feed required for intensive compensatory milk production. If marginal animal feed is derived from soybeans cultivated on recently converted cropland in South America, the net GWP burden increases to 4099 kg CO2e Mg−1 maize DM codigested – equivalent to 55 Mg CO2e yr−1 per hectare used for AD-maize cultivation. We conclude that AD of slurry and food waste on dairy farms is an effective GHG mitigation option, but that the quantity of codigested crops should be strictly limited to avoid potentially large international carbon leakage via animal feed displacement.