Introduction

To meet the rising demand for food and meat driven by a growing and more affluent global population, the use of synthetic nitrogen (N) fertilizers in agriculture has surged, accompanied by the expansion of intensive livestock feedlots1. While this approach has boosted yields, it has also exacerbated the decoupling between cropland and livestock farming2. Over recent decades, factors such as cropland fragmentation, urbanization, and industrialization have intensified these challenges2,3,4. Statistics show that the proportion of households engaged in crop-livestock integration has plummeted from 71 to 12%2, with only 30–40% of manure being returned to the cropland5. Moreover, the improper application of synthetic fertilizers and manure in the cropland has resulted in environmental degradation and reduced crop productivity6,7,8. If no intervention is taken, these issues may pose serious threats to the sustainability of the food system by 20509.

Recycling manure to croplands has been proven by numerous studies to lower nitrogen losses to the environment and decrease reliance on synthetic fertilizers10,11. Studies such as Xia et al. 12 and Zhang et al. 8 have used meta-analysis to clarify the impact of manure replacing chemical fertilizers on agronomic benefits, environmental impacts, and soil health under different environmental conditions8,12. However, due to the two-sided nature of manure, trade-offs are needed between yield increases and nitrogen emission reductions, as well as between N2O emission reductions and CH4 emission reductions8,13. Although these studies reveal the potential advantages and limitations of manure as a substitute to chemical fertilizers, there is still room for improvement in comprehensively assessing and weighing the integrated benefits of manure as an alternative to chemical fertilizers in terms of agronomics, environment, economics, and soil health. This lack of assessment hinders the development of optimal manure application strategies. Globally, countries are striving to achieve the sustainable development goals (SDGs)14. In this context, seeking to achieve a balance between multiple conflicting objectives to promote synergistic multi-objective enhancement has become an urgent need. Genetic algorithm, as a classical multi-objective optimization technique, has been applied in the field of agronomy15. Meanwhile, meta-analysis provides a comprehensive approach to assess the benefits of manure replacement of chemical fertilizers16. Innovative combinations of these two approaches are of great value in achieving an optimal balance between multiple benefits.

Compared with synthetic fertilizers, manure has a lower nutrient concentration, requiring the transport of larger quantities to deliver equivalent nutrient inputs. Relocating livestock operations closer to cropland can enhance the practicality of manure utilization by minimizing transportation costs2,10. This spatial proximity also facilitates more efficient transfer of grain feed from crop-producing areas to livestock farms. Regarding the relocation of the livestock industry, the Chinese government mandates that newly established livestock facilities must be accompanied by adequate surrounding arable land to enable manure application17, which provides policy support for the relocation of livestock and poultry. Recent research has shown that aligning livestock distribution more closely with cropland availability has notable environmental benefits. For instance, redistributing one-third of the national livestock to areas with high cropland density could reduce manure-derived nitrogen emissions by approximately two-thirds and lower half population exposure to ammonia pollution11. This offers valuable insights for the strategic reorganization of livestock farming. However, these studies often emphasize emission reduction on the livestock side, neglecting the potential for emission reduction in the cropland, which hinders a more detailed assessment of the benefits of recycling agricultural manure. Therefore, clarifying the potential for field application of manure based on multiple benefits and plans for the relocation of livestock is essential for reintegrating crop and livestock systems and achieving sustainable development of the agricultural ecosystem. China, which used about 36% of the global synthetic N fertilizers and raised 22% of the global livestock with 11% of the world’s agricultural land18,19, was a hotspot for global reactive N-related environmental pollution and climate change. Achieving efficient allocation and utilization of manure resources under such an intensive agricultural system is not only crucial for the sustainable development of agriculture in China but also provides practical pathways and policy references for other regions facing similar challenges worldwide.

In this study, we use China as a case study to evaluate the potential for optimizing manure utilization as a replacement for synthetic N fertilizers. We employ a meta-analysis combined with genetic algorithms to determine the optimal substitution ratios and the associated agronomic and environmental benefits for nine major crops, based on 6740 data pairs extracted from 650 peer-reviewed studies. Using data from 316,761 farm households in the second agricultural pollution source census conducted in 2017 and statistical sources, we assess the cropland’s capacity for manure application and the spatial livestock production surplus at county and provincial scales. Furthermore, we conduct a cost-benefit analysis to examine the economic viability of implementing optimized manure management strategies.

Results

Unreasonable manure application in cropland

The application of manure resources in China was mainly concentrated on crops such as vegetables, fruits, tea, and potatoes, with the proportion of manure-applied cropland reaching 34.7–53.7% (Fig. 1a). While, the utilization of manure on major grain crops such as rice, wheat, and maize were relatively limited, accounting for only 5–15% (Fig. 1a). However, as the key to ensuring food security, the planting area and synthetic N fertilization amount of grain crops account for 63.5% and 54.6% of the national total, respectively (Supplementary Fig. 4a, b). Therefore, the application of manure to grain crop fields has a great potential to reduce the proportion of synthetic N application, thereby reducing the N-related environmental pollution of grain production. Meanwhile, manure is also a rich source of other essential nutrients, such as phosphorus, potassium, and other microelement. This can further meet the nutritional needs of crops and reduce the use of chemical phosphorus (P) and potassium fertilizers. Spatially, the proportion of manure-applied cropland was low in all provinces, with 93.6% of provinces having less than 50% of manure-applied cropland and 61.3% having less than 30% (Fig. 1b).

Fig. 1: Current status of nitrogen and phosphorus application of synthetic fertilizers and manure for nine major crops in China.
Fig. 1: Current status of nitrogen and phosphorus application of synthetic fertilizers and manure for nine major crops in China.
Full size image

a A comparison of fertilizer application for different crops on synthetic fertilizer alone and on manure-applied cropland. b The proportion of manure-applied cropland and the substitution ratio of manure-applied cropland in different provinces. Columns represent chemical fertilizer N, P and manure N and P application in manure-applied cropland. Scattered dots represent synthetic nitrogen and phosphorus application amount in cropland applying chemical fertilizer alone. Circles represent the proportion of all cropland with manure application and cropland with chemical fertilizer alone. The numbers in the circles represent the number of croplands surveyed for different crops SR stands for substitution ratio. The red and blue fonts represent the increase proportion in N and P application, respectively, of the manure-applied cropland compared to plots where synthetic fertilizer was applied. The horizontal axis represents different provinces, and the corresponding spatial positions can be seen in Supplementary Fig. 11. The error bars represent the standard deviation.

There is spatial heterogeneity in the substitution rates (SR) both within and between provinces. The average SR in the provinces varies from 30% to 80%. Higher proportions of manure-applied cropland are observed in provinces such as Beijing (BJ), Yunnan (YN), and Guizhou (GZ), while lower proportions are found in Hunan (HN), Jiangxi (JX), and Heilongjiang (HLJ). Notably, 27.0% of cropland exhibits a substitution ratio exceeding 75%, and 45.5% exceeds 50%. Our results showed that the total N input of cropland applied with manure increased by 0.3–72.2%, and the total P input increased by 49.2−156.5% compared to cropland only applied with synthetic fertilizers (Fig. 1a). However, these increases in nutrient inputs did not result in higher crop yields (Supplementary Fig. 1). These results suggest that there is an urgent need to optimize the current manure application rate in China.

Optimal manure strategy and its benefits

A multi-objective optimization approach was employed to balance crop yield, economic benefits, greenhouse gas emissions (GHGs), water pollution, soil health, and ammonia (NH3) emissions, based on the principle that no benefits were diminished and all objectives were equally important. The optimal substitution rate (OPSR) for nine major crops was determined under field conditions. The limiting substitution ratio, defined as the point beyond which any benefit begins to decline, was used as the threshold for optimization. The OPSR in wheat, maize, oilseed, cotton, potato, fruit, vegetable, and tea were 34%, 46%, 51%, 53%, 52%, 60%, 44% and 50%, respectively. Rice did not have an OPSR due to significant GHGs at higher SRs (Fig. 2). Sensitivity analysis showed that the OPSR for rice and oilseed were most sensitive to economic benefits, while wheat, maize, and tea were more influenced by environmental factors (Supplementary Table 10). Crops like cotton, fruits, and vegetables were most sensitive to yield changes, while potatoes were impacted by soil health benefits. Despite these variations, the model showed robustness with minimal overall standard deviation (Supplementary Table 10).

Fig. 2: Optimal and limiting substitution ratios of synthetic N replaced by manure N for different crops under multi-objective optimization.
Fig. 2: Optimal and limiting substitution ratios of synthetic N replaced by manure N for different crops under multi-objective optimization.
Full size image

Optimal and limiting substitution ratios for rice (a), wheat (b), maize (c), oilseed (d), cotton (e), potato (f), fruit (g), vegetable (h) and tea (i), respectively. Blue dots represent optimal substitution ratio (OPSR) and red dots represent limiting substitution ratios (above which there is a loss of benefits). GHGs represent the combined greenhouse effect from methane (CH4) and nitrous oxide (N2O). NH3 represents ammonia emissions. The error bars represent the standard deviation.

When manure N replaced synthetic N at the OPSR, the yields of the eight major upland crops increased by 2.0–19.5%, while N2O emissions decreased by 2.5–33.2%, NH3 volatilization by 2.5–36.9%, N leaching by 19.9–53.8%, and N runoff by 17.2–53.4%. In addition, organic matter increased by 1.2–35.5%, and soil pH improved by 0.2–9.1% (Supplementary Fig. 2b). Under the business-as-usual (BAU) scenario, national synthetic N application reached 34.4 Tg (Supplementary Fig. 5), with ~8.9 Tg N lost through volatilization, runoff, and leaching. By contrast, under the OPSR scenario, synthetic N use decreased by 38.7% (13.3 Tg N) (Supplementary Fig. 5), resulting in a 22.1% reduction in total national reactive nitrogen (Nr) loss (2.0 Tg N) and a 25.8% reduction in per-unit-area Nr loss (from 66.9 to 49.7 kg ha−1) (Fig. 3j, Supplementary Fig. 3b). Emissions of N2O, NH3, and losses via runoff and leaching decreased by 0.1, 0.8, and 1.1 Tg N, respectively (Fig. 3j, Supplementary Fig. 7). Among the crops studied, vegetables, fruits, and tea showed the highest Nr reduction potentials, at 35.2, 33.4, and 21.2 kg ha−1, respectively, while wheat, oilseed, cotton, and potatoes exhibited relatively lower reduction potentials (ranging from 5.3 to 11.7 kg ha−1) (Supplementary Fig. 9a).

Fig. 3: Spatial changes in various nitrogen loss from BAU to OPSR scenario.
Fig. 3: Spatial changes in various nitrogen loss from BAU to OPSR scenario.
Full size image

Nitrous oxide (N2O) emissions in BAU (a) and OPSR (b), and change in N2O emissions from BAU to OPSR (c).Ammonia (NH3) emissions in BAU (d) and OPSR (e), and change in NH3 emissions from BAU to OPSR (f). Reactive nitrogen (Nr) loss to water in BAU (g) and OPSR (h), and change in Nr loss to water from BAU to OPSR (i). j The emission reduction potential of N2O, NH3, and Nr loss to water for different provinces. k The emission reduction potential of N2O, NH3, and Nr loss to water for different crops. BAU represents reference scenario reflecting current practices in fertilizer use and livestock distribution without any optimization. OPSR represents a scenario where manure is optimally substituted for synthetic nitrogen, and livestock is relocated to better match cropland nutrient needs. The error bars represent the standard deviation. The base map is applied from GADM data (https://gadm.org/).

Regionally, Nr loss hotspots were concentrated in Northwest, North, and Northeast China (Fig. 3, Supplementary Fig. 14). NH3 and N2O emission reduction hotspots were concentrated in northern China, while Nr losses through runoff and leaching were more prominent in southern China. For instance, Shaanxi (SAX) and Shandong (SD) provinces had Nr losses of up to 85.0 and 78.0 kg ha−1, respectively (Supplementary Fig. 3). These provinces also exhibited high potential for Nr reduction, with reductions of 24.5 and 17.8 kg ha−1, respectively. The widespread cultivation of fruits and vegetables in these regions likely contributed to both high Nr losses and substantial reduction potential (Supplementary Fig. 4). The spatial potential for Nr loss reduction varied by crop: wheat in North China, maize in Northeast and Southwest China, cotton in Xinjiang (XJ), potato in Northwest and Southwest China, oilseed in the Yangtze River Basin, vegetable in North and South China, fruit in South and Northwest China, and tea in the Southwest and Southeast, were identified as key target areas for emission reduction (Supplementary Fig. 13).

The implementation path of OPSR

Our analysis had pinpointed the OPSR for nine crops, revealing a carrying capacity ranging from 7.3 to 13.1 pig equivalents per hectare for grain crops (wheat and maize), and a higher range of 13.3–21.2 pig equivalents per hectare for economic crops (Supplementary Fig. 8). This disparity aligned with the higher N application rates for typical economic crops. The estimated national cropland carrying capacity were 1634 million pig equivalents (about 11.4 Mt manure N) -surpassing current levels by 42.4% (Fig. 4a, b). This suggests that, at a national scale, there is sufficient cropland to carry all animal manure generated by the livestock production. However, a geographical imbalance exists between the produced manure and those requiring additional nutrients for crops (Fig. 4c), with regions like Hunan (HN), Jiangxi (JX), and Liaoning (LN) accounting for over 74.2% of the total production surplus in China under the OPSR (Fig. 4d).

Fig. 4: The spatial matching degree and optimization potential of livestock production and cropland carrying capacity at OPSR.
Fig. 4: The spatial matching degree and optimization potential of livestock production and cropland carrying capacity at OPSR.
Full size image

a Current livestock production amount. b Cropland carrying capacity. c County-level livestock production surplus. d Provincial-level livestock production surplus. e Livestock transfer between and within province. f GHGs reduction potential of replacing units of synthetic N with manure N, and the maximum transport distances they support. GHGs represent the combined greenhouse effect from methane (CH4) and nitrous oxide (N2O). The error bars represent the standard deviation. The base map is applied from GADM data (https://gadm.org/).

Manure recycling stands as an effective strategy for reducing pollution from livestock operations and improving crop yields, while simultaneously decreasing reliance on synthetic fertilizers13. If the manure was only applied to nearby croplands, 37.2% of counties in China would face livestock production beyond their optimal carrying capacity, resulting in about 2.4 Mt of manure N with high environmental risk (Fig. 4c). To maintain environmental sustainability and prevent overburdening of local croplands, it is crucial to strategically decrease livestock density in regions where manure output surpasses cropland capacity, while bolster it in regions with surplus carrying capacity15. This paper presents a county-scale estimate of cropland carrying capacity based on multi-objective optimization (Fig. 4b), offering a framework to reconnect livestock and cropland on a large scale, thus reducing manure storage and transportation costs. At the OPSR, this would involve transferring 255 million pig equivalents (1.8 Mt N), with intra-provincial transfers making up 67.7% and inter-provincial transfers 32.3% (Fig. 4e). Provinces like Hebei (HB), Henan (HeN), Shandong (SD), Xinjiang (XJ), Shaanxi (SAX), and Jiangsu (JS) have the potential to accommodate additional livestock, offering a strategic solution for manure distribution.

The carbon emissions generated from transporting manure can counteract the benefits of reduced GHGs achieved by returning manure to the cropland. The benefits of carbon emission reduction per unit of synthetic N replaced by manure N vary by crops (ranged from 0.4 to 2.1 kg CO2eq), with distances supported by these benefits ranging from 155 to 840 kilometers (Fig. 4f), depending on the crop types. For upland crops, vegetables show the best reduction effect and can be transported the farthest, while maize has the poorest reduction effect. However, the rapid growth of CH4 emission in paddy fields leads to negative carbon reduction benefits, so there is no maximum sustainable transport distance.

Cost-benefit analysis of optimal manure strategy

Achieving the identified Nr pollution reduction potential at the OPSR would require a substantial investment, with total costs estimated at ~US$ 200 billion, primarily attributed to restructuring existing livestock operations. Spread over the period until 2050, this equates to an average annual implementation cost of US$ 6.1 billion (Fig. 5g). These investments are concentrated in the North China Plain and Northeast regions (Fig. 5d), where opportunities for large-scale farming and efficient manure utilization are greatest. However, the two regions were also the areas with the largest net benefits due to their higher climate and ecological environmental benefits (Fig. 5e).

Fig. 5: Benefits and costs for manure applications at OPSR.
Fig. 5: Benefits and costs for manure applications at OPSR.
Full size image

a Climate benefits. b Human health benefits. c Ecosystem benefit. d Implementation cost. e Net benefit. f Ecological benefits for different crops. g The total benefits and implementation costs. The error bars represent the standard deviation. The base map is applied from GADM data (https://gadm.org/).

In return, the anticipated societal benefits from mitigating Nr pollution—encompassing improvements in human health, ecosystem integrity, and climate regulation—are projected at nearly US$ 25.9 billion annually (Fig. 5a–c). In the long term, implementation costs can be offset by the sustained benefits of the climate, human health and ecosystems. Ecosystem-related advantages alone contribute an estimated US$ 19.6 billion per year, primarily due to reduced eutrophication, enhanced water quality, boosted aquaculture output, and biodiversity conservation through lower Nr emissions.

These positive outcomes are concentrated in the Yangtze River Delta and North China Plain, which are poised to achieve significant reductions in NO3 discharge (Fig. 5c). Furthermore, reduced NH3 emissions are expected to enhance air quality, generating human health benefits of ~US$ 5.6 billion annually, especially in the North China Plain (Fig. 5b, g). Improved nutrient recycling is also projected to increase crop productivity and lower fertilizer demand, boosting farmers’ incomes by an estimated US$ 66.2 billion per year (Supplementary Fig. 3). Climate benefits from reduced N2O emissions are valued at around US$ 0.7 billion annually (Fig. 5g). Overall, optimizing manure application in agricultural systems could deliver societal returns nearly four times greater than the associated costs, affirming the economic and environmental viability of ambitious Nr abatement strategies. The North China Plain and Northeast stand out as strategic focal points, offering the highest benefit-to-cost ratios. Crops like maize, vegetable, and fruit offer particularly strong ecological returns due to their extensive cultivation and high emission reduction potential per unit area (Fig. 5f; Supplementary Fig. 6).

Discussion

The recycling and utilization of livestock manure in agricultural fields have become a global focal point, recognized for their significant potential to enhance soil health, boost crop productivity, reduce reliance on chemical fertilizers, and address pressing environmental issues20,21. These goals align closely with the United Nations’ SDGs, particularly SDG 2 (Zero Hunger) and SDG 13 (Climate Action)14. However, achieving an efficient manure recycling system is fraught with challenges, with the primary issue being how to balance economic productivity, environmental conservation, and the sustainability of crop yields8.

Studies indicated that high manure SRs (above 75%) can significantly improve soil quality, increase organic matter content, and reduce nitrogen losses, presenting a robust alternative to chemical fertilizers13,22. However, such high SRs often lead to reduced crop yields, especially in intensive farming systems that rely heavily on synthetic inputs22. Conversely, low SRs (below 40%) can maintain or even enhance crop yields and economic returns but fall short of delivering optimal environmental and soil health benefits. Many studies highlighted this trade-off12,13,23. Thus, devising manure substitution strategies that optimizing productivity while also enhancing environmental and soil health outcomes has become a key focus of scientific research23.

The integration of genetic algorithms and meta-analysis in this study represents an approach to addressing complex, multi-objective optimization problems in sustainable agriculture. Meta-analysis synthesizes findings from diverse studies to provide statistically robust and generalizable input parameters, ensuring the reliability and relevance of the data used in the model24,25. Genetic algorithms, renowned for their flexibility and global optimization capabilities, are particularly suited for solving multi-objective problems26, allowing for the simultaneous consideration of trade-offs between crop yield, soil health, and environmental benefits15,27. By combining these methodologies, the study overcomes the limitations of each approach when used independently: meta-analysis is enhanced by the dynamic optimization capabilities of genetic algorithms, while genetic algorithms gain from the empirical robustness of meta-analyzed data. This synergy not only improves the precision and adaptability of the results but also bridges the gap between theoretical analysis and practical application, providing a comprehensive framework for guiding sustainable agricultural practices. Building on this, our study introduces a zoned management approach to address the diverse agricultural development goals across different regions in China. As agricultural objectives evolve, the optimal manure SR and regional livestock carrying capacity should be dynamically adjusted to match the shifting priorities of each region. For instance, in the red and yellow soil areas of southern China, where soil acidification and nutrient deficiency are severe, the weights of soil pH and organic matter indicators should be increased to better support sustainable agricultural production. In agricultural areas of Yangtze River Basin with high rainfall and temperatures, the weight of nitrogen runoff loss indicators should be appropriately increased to reduce the risk of water pollution. By adjusting the weights of different objectives based on regional characteristics, this strategy can better align with the unique environmental, economic, and social goals of each area. This approach ensures that manure substitution strategies are not only scientifically optimized but also regionally tailored, enhancing their feasibility and effectiveness.

Based on our multi-objective framework, the optimal manure substitution ratio should be adjusted based on local ecological and economic conditions28. Ecologically, soil type, climate, and topography significantly influence the effectiveness of manure use7,29,30. In northern China, with its cold, dry climate and clay-rich soils, lower manure SRs (20–40%) were suitable for maintaining soil organic fertility and crop yield (Fig. 2 and Supplementary Fig. 2a). In contrast, the southern regions, with higher rainfall, mountainous terrain, and fragile ecosystems, required higher SRs (50–75%) to reduce nutrient loss, soil erosion and enhance soil organic matter and fertility (Fig. 2 and Supplementary Fig. 2a). Additionally, sandy soils in the northern regions necessitate higher rates due to higher nutrient loss and lower soil fertility.

Economically, farm size, resource availability, and infrastructure impact manure substitution feasibility31. Smallholder farmers, particularly in less economically developed regions, face challenges in adopting high manure SRs due to limited resources, labor, and infrastructure32,33. For these farmers, lower SRs (20–40%) are often more practical, as they can still benefit from the soil-improving properties of manure while keeping costs manageable. In contrast, large-scale farms in wealthier regions, equipped with better mechanization and infrastructure, are better positioned to implement higher SRs (50–75%). These farms can handle larger volumes of manure, optimize its use, and integrate advanced manure treatment technologies, making higher SRs both feasible and economically viable34,35. Moreover, regions with higher livestock densities, higher manure production, and higher cash crop cultivation (e.g., parts of North and Central China) are better suited for higher manure recycling rates.

Thus, effective manure substitution strategies should be tailored to the specific ecological and economic characteristics of each region. In areas with favorable soil types, climate, and infrastructure, higher SRs can benefit both soil health and crop yields, while in regions with limited resources or environmental constraints, more conservative approaches are necessary. Investment in infrastructure, such as manure storage and transportation systems, and support for smallholder farmers through training and cooperative manure management are crucial for improving manure utilization and ensuring the long-term sustainability of these practices across different regions36,37.

China faces a significant spatial disconnect between livestock farming and cropland cultivation, limiting effective manure utilization and causing resource waste and environmental pollution (Fig. 4c). Our results indicate that optimizing the spatial distribution of livestock and the application of manure can synergistically enhance crop yields, reduce carbon and nitrogen emissions, and improve soil health (Supplementary Fig. 2). However, challenges such as reduced feed availability, higher management costs, and increased biosecurity risks may constrain large-scale farm relocations1,9. The “rearing pigs in the north” policy introduced in 2015 successfully moved millions of pig farms from the ecologically fragile, water-rich southern regions to the north, reducing nitrogen pollution and improving feed self-sufficiency5,38. However, this policy also revealed issues such as price fluctuations and supply chain break due to the African swine fever and COVID-19, highlighting the complexities of relocation strategies23,39. Despite these challenges, the long-term societal benefits of reducing health costs and improving water and air quality remain critical drivers for promoting the rational layout of livestock farming10.

In the short term, significant barriers such as interprovincial disparities in labor, land, energy, and capital costs, coupled with varied regulatory frameworks and the prevalence of smallholder farming, hinder large-scale relocation32,33. However, these challenges are expected to diminish by 2050 as the government promotes land consolidation and large-scale farming34,40. Compared to interprovincial strategies, prioritizing within-province livestock adjustment offers lower transport costs and reduced resistance. Under the OPSR, only 31.3% of livestock relocation occurs across provinces (Fig. 4e), suggesting that most adjustments are expected within provincial boundaries. This enhances the practicality of relocation, as farmers are more likely to accept changes that keep them closer to home. Policies such as “land determines livestock”, encourage counties to align livestock density with available cropland while integrating centralized manure treatment facilities17. This approach establishes sustainable recycling mechanisms, fostering integration between livestock and crop farming systems. Additionally, promoting manure recycling and agricultural social services can enhance resource efficiency by integrating livestock and crop production2. However, despite the high ecological benefits of manure application, the high labor costs required for the application of manure and the lack of short-term economic benefits, coupled with its market price disadvantages and insufficient policy subsidies, farmers are more inclined to convenient and cheap fertilizers32,33. Therefore, encouraging cooperation between livestock farms and crop producers through farmer cooperatives and service organizations can create stable supply-demand relationships and address the “last-mile” challenges in manure utilization, making manure application more economically viable and accessible.

To accelerate the transition, innovative policies such as nitrogen credit systems and subsidies for pollution reduction are essential31,41. These approaches can incentivize farmers to adopt manure as a sustainable alternative to chemical fertilizers, thereby mitigating the economic disincentives. Simultaneously, farmer training and technical support should be strengthened to improve scientific manure management. Establishing contractual agreements between service providers and livestock farms can ensure a stable manure supply, while collaboration with crop producers enables efficient manure application. These measures would significantly enhance the sustainability of the crop-livestock recycling loop. Overall, strategically reallocating livestock production and improving manure use can significantly boost agricultural efficiency, lower GHGs, and enhance soil quality. Achieving these goals, however, requires well-designed policies and stakeholder collaboration to overcome institutional, economic, and social barriers. Future research should focus on region-specific priorities and explore the complex interactions between ecological, economic, and social factors to develop long-term sustainable strategies11. These efforts not only advance China’s agricultural transformation but also offer valuable insights for optimizing global agricultural systems.

Our study highlights the potential benefits, feasibility, barriers, and possible solutions for transitioning from synthetic fertilizers to manure in advancing the SDGs. However, our multi-objective optimization approach assumes that all SDGs are equally important, which may not always be realistic. Policymakers often prioritize these goals differently based on the specific needs and circumstances of their regions. For example, in the heavily acidified red soil regions, improving soil health is a major priority, while in tropical and coastal areas, controlling nitrogen runoff, leaching losses, and reducing NH3 emissions are more urgent due to high precipitation and temperatures. Therefore, future studies could expand upon this study by incorporating local priorities into multi-objective optimization to achieve a more synergistic enhancement of sustainable benefits. Additionally, Prior research has demonstrated that sustained use of manure in place of synthetic fertilizers can enhance both soil health and crop yields8. However, in this study, we focused on short-term and medium-term data to address the uncertainties and risks associated with current cropland management, particularly the potential for yield reductions in the short term (Supplementary Fig. 12). This approach limits our exploration of the long-term impacts of manure substitution, particularly in terms of soil health, ecosystem services, and socio-economic outcomes. Future studies should explore the long-term benefits of manure substitution to provide a more comprehensive basis for decision-making.

Methods

Data collection

The cropland data and animal numbers data used in this study were obtained from the second agricultural pollution source census conducted in China in 2017 by Ministry of Agriculture and Rural Affairs, which covered 316,761 households from more than 2772 counties in China. Cropland data included crop types, cultivated areas, economic yield, and all fertilizer application information in a year. Each field had one or more crops seasons. The nine major crop types were in this study: rice, wheat, maize, oilseed, cotton, potatoes, fruits, vegetables, and tea, with 92,593, 49,842, 84,492, 19,999, 5618, 6588, 43,407,74,725 and 5616 fields, respectively, accounting for 85.9% of total fields numbers. For each crop season in a filed, the crop type, fertilization time, type, amount and their N and P2O5 contents were used to calculate N and P2O5 fertilization rate of different crops. The fertilizers were categorized into two major groups: inorganic fertilizers and organic fertilizers. Organic fertilizers included cattle manure, pig manure, chicken manure, other livestock manure, and commercial organic fertilizer. The cultivated areas of major food crops of a province was the sum of the cultivated areas of covering counties. The animal numbers at the county level were obtained from the census and Wang et al.42. The animal numbers at the province level were derived from China Rural Statistical Yearbook in 2017.

The meta-analysis examined the impacts of substituting synthetic nitrogen with manure nitrogen on crop yields, N loss, GHGs emissions, or soil health for nine major crops (maize, rice, wheat, oilseed, cotton, potato, vegetable, fruit, and tea) in China. Data were extracted from pertinent peer-reviewed studies published between 2000 and 2021, sourced from the Web of Science (https://www.webofscience.com/) and China National Knowledge Infrastructure (http://www.cnki.net/) databases. The following search terms were used to identify studies: “manure” OR “organic fertilization” AND “crop yield OR productivity” OR “organic carbon OR SOC” OR “N2O OR nitrous oxide” OR “CH4 OR methane” OR “nitrogen” OR “greenhouse gas” OR “leaching” OR “runoff“ OR “ammonia volatilization OR NH3“ OR “soil organic carbon“ OR “soil enzyme activity”.

Studies retrieved through these terms were then screened based on the following criteria: (1) Pot experiments, cultivation experiments, and theoretical models were excluded; (2) Studies must include both control (synthetic N fertilization) and treatment (application of manure N source) groups, with a minimum of two replicates for each group; (3) The studies necessitated clear specification of the both manure and synthetic fertilizer types and quantities and plant-derived organic fertilizer was excluded; (4) Identical observations from various studies were included only once to prevent data duplication. For data presented in figures, GetData Graph Digitizer (v2.26) was used for extraction. The soil organic matter content was calculated by multiplying soil organic carbon (SOC) by a conversion factor of 2.043. For the research without standard deviation (SD), SD was calculated using the ratio of SD to the mean of other studies16. Data compilation adhered to the PRISMA guidelines (Supplementary Fig. 15).

The meta-analysis comprised 6740 paired observations (from 650 studies). Crops received identical total N inputs from either synthetic N fertilization alone or manure substitution. The SR was calculated as manure N input divided by the total N applied for each treatment. 6740 observations of manure substitution were extracted to compare the crop yield (2623), CH4 emission (237), N2O emission (537), NH3 emission (269), N leaching (258), N runoff (188) and soil health (microbial biomass carbon (MBC) and microbial biomass nitrogen (MBN), 516; Soil organic matter (OM), 719; Soil enzyme activity, 713; Soil microbial abundance and diversity, 110; Soil pH, 586). Additional collected parameters included: geographic location (latitude/longitude), climatic conditions (mean annual temperature (MAT); mean annual precipitation (MAP)), soil characteristics (initial OM, pH), manure application duration, and fertilizer application parameter (N rate, SR).

Meta analysis

The response ratio (RR) is the ratio of the research index of the treatment group and the control group. The natural logarithm of RR was calculated as the effect value (\({\mathrm{ln}}{RR}\)), and was calculated by the Eq. (1)8:

$${{\mathrm{ln}}}{RR}={{\mathrm{ln}}}\left(\frac{{X}_{{{\rm{e}}}}}{{X}_{{{\rm{c}}}}}\right)={{\mathrm{ln}}}{X}_{{{\rm{e}}}}-{{\mathrm{ln}}}{X}_{{{\rm{c}}}}$$
(1)

where \({X}_{e}\) and \({X}_{c}\) represent the means of the manure-applied and control treatment for variable X, respectively.

The variance of \({\mathrm{ln}}{RR}\) was determined as follows7.

$${V}_{{{\mathrm{ln}}}{RR}}=\frac{{S}_{{{\rm{e}}}}^{2}}{{n}_{{{\rm{e}}}}{X}_{e}^{2}}+\frac{{S}_{{{\rm{c}}}}^{2}}{{n}_{{{\rm{c}}}}{X}_{{{\rm{c}}}}^{2}}$$
(2)

where \({S}_{C}\) and \({S}_{e}\) represent the standard deviations of variables in the control and manure-applied treatments, respectively. \({n}_{c}\) and \({n}_{e}\) denote the number of replicates in the control and manure-applied treatments, respectively.

RRs were converted to percentage change values using the formula [(RR − 1) × 100], facilitating more intuitive interpretation of treatment effects. The weighted average response (RR) was obtained by weighting the response of each independent study. MetaWin 2.1 was used to generate an average effect size and 95% confidence interval (CI) through bootstrapping (4999 iterations)44. Differences in effect sizes among categories were assessed using QM statistics, with statistical significance determined at P  <  0.05. The effect sizes and QM values under different substitution ratio groups were presented in Supplementary Table. 11. Publication bias was assessed through funnel plot analysis complemented by Egger’s test. Additionally, Rosenberg’s fail-safe number was employed to assess the robustness of the results against potential publication bias. Although minor publication bias was identified, its impact on conclusions was negligible given the Rosenberg fail-safe N numbers was sufficiently large and statistically significant (P < 0.0001; Supplementary Fig. 16).

Economic and ecological analysis

Based on prevailing market prices, the economic analysis considered production costs, income, and economic profit (EP). The \({Cost}\), \({Income}\), and \({EP}\) were calculated according to Gu et al.31. The cost details were shown in Supplementary Table 1.

$${Cost}=S+F+M+P+L+I$$
(3)

where \({Cost}\) is the total production cost for crop (maize, wheat, rice, oilseed, cotton, potato, vegetable, fruit and tea) in US$ ha−1 (in 2022 constant US$). \(S,F,M,P,L,I\) represent the cost of seed, fertilizer, farm machinery, pesticide, labor, and indirect cost, respectively.

$${Income}={Ycrop}\times {Pcrop}$$
(4)
$${Ycrop}={Yav}\times (1+p)$$
(5)

where \({Income}\) is income (US$ ha−1) during crop production, \({Ycrop}\) is the average crop grain yields (kg ha−1) at different substitution ratios, \({Pcrop}\) is the average grain prices (US$ kg−1), \({Yav}\) is the national average yields of crops (kg ha−1), \(p\) represents the changes in crop yield under different substitution ratios.

Calculation of environmental costs (\({EC}\)), net economic benefits (\({NEEP}\)), total increased economic benefits (\({EB}\)) and ecological benefits (benefit of human health and ecosystem resulting from the reduction in reactive N losses and GHGs) (\({EOB}\)) compared to using synthetic N fertilizer alone were performed according to Cai et al.45.

$${EP}={Income}-{Cost}$$
(6)
$${EC}={Nr}\times {{Price}}_{{Nr}}+{GHGs}\times {{Price}}_{{GHGs}}$$
(7)
$${NEEP}={EP}-{EC}$$
(8)
$${EB}=\sum ({{EPO}}_{i}-{{EPC}}_{i})\times {A}_{i}$$
(9)
$${EOB}=\sum ({{ECC}}_{i}-{{ECO}}_{i})\times {A}_{i}$$
(10)

where \({EP}\) is EP (US$ ha−1) and \({Cost}\) is cost (US$ ha−1) during crop production. \({EC}\) stands for ecological cost (US$ ha−1), \({EB}\) and \({EOB}\) represent total increased economic and ecological benefits compared to using synthetic N fertilizer alone (US$), respectively. \({NEEP}\) is net EP (US$ ha−1). Nr is the reactive N losses (NH3, N leaching and runoff) (in kg N ha−1); GHGs is the greenhouse gas (CH4 and N2O) emissions (in Mg CO2eq ha−1); \({{Price}}_{{Nr}}\) and \({{Price}}_{{GHGs}}\) are the price of Nr and GHGs costs of acidification, eutrophication, and health (in US$ kg−1 N or US$ Mg−1 CO2eq), respectively. \({{EPO}}_{i}\) and \({{EPC}}_{i}\) represent the EP (US$ ha−1) under optimal proportional substitution (OPSR) of the ith crop and single synthetic fertilizer application, respectively; \({{ECC}}_{i}\) and \({{ECO}}_{i}\) represent the ecological costs (US$ ha−1) of a single synthetic fertilizer application and OPSR for the ith crop, respectively. \({A}_{i}\) represents the planted area of the ith crop. Supplementary Table 2 contains additional details on emission factors as well as market prices and costs.

The calculation of carbon emissions generated by manure transportation (\({S}_{R}\))(tCO2 100 km−1) and the maximum ecological distance (\({Distance}\)) (km) without increasing net carbon emissions were calculated with reference to Jiang et al.46.

$${S}_{R}=\sum F{C}_{{ij}}^{v}\times E{F}_{i}\times \frac{C}{N}$$
(11)
$${Distance}=\frac{{GHGsr}}{{S}_{R}}\times 100$$
(12)

where \(F{C}_{{ij}}^{v}\) represents the fuel consumption for every 100 km (tCO2 100 km−1) by vehicles of category j using fuel type i, with specific values listed in Supplementary Table 3. \(E{F}_{i}\) is CO2 emission factors (tCO2 t−1) for class i fuel, and the value is shown in Supplementary Table 4. N refers to the maximum carrying capacity (t) of the vehicles, under the assumption that they are operating at full capacity. For transportation, we chose Level III and below trucks with a load capacity of ≤1800 kg. \({S}_{R}\) represent the CO2 emission by road. C is the manure weight (t). \({GHGsr}\) represents the carbon emission reduction benefits achieved after optimizing the substitution of manure (tCO2).

The implementation cost of livestock relocation (\({LR}\)) was calculated with reference to Deng et al.47.

$${LR}={\sum}_{t}\left[\frac{{{PR}}_{t}\times (\, \beta \times {{FRCost}}_{t}+{{LRCost}}_{t})}{{YS}}\right]+{\sum}_{t}{{PI}}_{t}\times {RCCost}$$
(13)

where \({{PR}}_{t}\) indicates the number of livestock need to be relocated from county t (unit pig), \({{PI}}_{t}\) represents the livestock that need to be resettled in county t (unit pig), β represents the land area required per unit pig (2.3 m2 per pig)48, \({{FRCost}}_{t}\) and \({{LRCost}}_{t}\) represent the unit cost for removal infrastructure and livestock (US$), respectively, with specific values listed in Supplementary Table 5. \({RCCost}\) denotes the unit production cost per pig (US$)46. YS represents the duration of the planning period, spanning from 2017 to 2050 (33 years).

Multi-objective optimization

The Non-dominated Sorting Genetic Algorithm (NSGA-II), an improved version of the original NSGA introduced in 200226,49, was employed for the multi-objective optimization in this study. NSGA-II, known for its faster processing and ability to handle complex problems without the limitations of its predecessor, was chosen due to its proven effectiveness in agricultural optimization tasks15.

First, a database of the relationship between the percentage of manure N substitution for synthetic N and agricultural green indicators was established based on the data obtained from the meta-analysis. Then we created objective functions \({f}_{1}\left(\vec{x}\right),{f}_{2}\left(\vec{x}\right),\ldots,{f}_{k}\left(\vec{x}\right)\). The objective function was a mathematical equation that expresses the correlation between substitution ratio as an independent parameter and other dependent parameter changes (such as yield, EP, NH3 emission, N2O emission, CH4 emissions, N runoff and leaching, soil indicators, etc.). Here, we divided all dependent indexes into six objective functions, including yield, NH3 volatilization, GHGs emissions (CH4 and N2O), water pollution (N leaching and N runoff), soil health (organic matter (SOM), MBC, microbial biomass nitrogen (MBN), richness index, Shannon Weiner index, pH, urease activity, phosphatase activity, sucrase activity, and catalase activity) and EP. EP was formed by fitting EP with different substitution ratios. GHGs emissions were mainly expressed in terms of CO2 equivalent. According to the IPCC’s sixth report, CH4 and N2O were equivalent to 27- and 273-times carbon dioxide equivalent50, respectively.

The objective function of GHGs was calculated as follows:

$${f}_{{GHGs}}=27\times {E}_{{{CH}}_{4}}\times {f}_{{{CH}}_{4}}+273\times {E}_{{N}_{2}O}\times {f}_{{N}_{2}O}$$
(14)

where \({f}_{{GHGs}}\) represents the objective function of GHGs, \({E}_{{{CH}}_{4}}\) represents the average absolute amount of CH4 emissions per unit area (kg ha-1), \({f}_{{{CH}}_{4}}\) represents the objective function of CH4, \({E}_{{N}_{2}O}\) represents the average absolute amount of N2O emissions per unit area (kg ha-1), \({f}_{{N}_{2}O}\) represents the objective function of N2O.

Based on the r-squared and p-values, the most optimal and significant equation was selected as the objective function (fitness function) in the optimization step, and the objective function for each variable was shown in Supplementary Fig. 10.

Given the heterogeneous units and dimensional incompatibility among objective functions, direct computational comparison was infeasible. To address, a standardization protocol to achieve unitless, scale-invariant metrics was implemented. Furthermore, to harmonize the conflicting optimization directions (where certain objectives required maximization while others necessitated minimization), we employed the following normalization framework51:

$${N}_{i}=\frac{{x}_{i}-{min }_{i}}{{max }_{i}-{min }_{i}}$$
(15)

where \({N}_{i}\) denote the normalized value of the ith indicator, \({x}_{i}\) corresponds to the optimized output for criterion i, maxi and mini represent the maximum and minimum outputs observed for ith indicator.

The boundary of the model was determined according to the limiting factors, such as the range of manure substitution ratio (\(0 < x\le 100\%\)) or the values that were unacceptable for a given objective function (such as \({f}_{k}\left(\vec{x}\right)\ge 0\) or \({f}_{k}\left(\vec{x}\right)\le 0\)). An important factor \({a}_{i}\) was added in front of each objective function to indicate the importance of indicators. Here, we primarily specified the OPSR. The weight details of different indicators were shown in Supplementary Table 6. The specific objectives and constraint ratios associated with the OPSR were described in Supplementary Table 7.

$$Minimize\; F \left(\vec{x}\right)=[\; f_{1}\left(\vec{x}\right),{f}_{2}\left(\vec{x}\right),\ldots,{f}_{k}\left(\vec{x}\right)]^{T}$$

Subject to:

$$g\left(\vec{x}\right)\le 0$$
(16)
$$h\left(\vec{x}\right)\le 0$$
$$x\in {R}^{n},f\left(\vec{x}\right)\in {R}^{k},g\left(\vec{x}\right)\in {R}^{m},h\left(\vec{x}\right)\in {R}^{p}$$

where n is the number of independent variables, \(k\) is the number of targets, \(m\) denotes the total number of inequality constraints, and \(p\) represents the number of equality constraints. R is the domain of real numbers. \(g\left(\vec{x}\right)\) and \(h\left(\vec{x}\right)\) represent the equality constraint function and the inequality constraint function, respectively. \(F\left(\vec{x}\right)\) represents the global objective function. \({f}_{1}\left(\vec{x}\right),{f}_{2}\left(\vec{x}\right),\ldots,{f}_{k}\left(\vec{x}\right)\) represent the individual objective functions that make up the global objective function.

By incorporating various objective functions, the general formula was adapted and modified. The fitness function was calculated as Eq. (17):

$$F={\sum }_{i=1}^{m}{\varphi }_{i}{a}_{i}{f}_{i}$$
(17)

where F is the fitness function. \(a\) represents the importance coefficient of the individual objective function, \(f\) is the individual objective function, \(i\) changes from 1 to m representing the number of objective functions, and \(\varphi\) is the direction of optimization. \(\varphi\) = “1” represents the objective function to be minimized, and \(\varphi\) = “−1” represents the function to be maximized fitness function.

The objective function was optimized using the non-dominated sorting genetic algorithm II (NSGA-II) and genetic algorithm to find a good balance among possible conflicting objectives to find the optimal ratio of organic fertilizer to replace synthetic fertilizer. The optimization process continued until one of the following stopping criteria was fulfilled.

The optimization targets were achieved.

The set number of generations was completed.

Computation time exceeded the limit.

The performance stabilized with no further improvement in the fitness function.

Sensitivity analyses were performed on the comprehensive optimization results (Supplementary Table 10), the soil health optimization results (Supplementary Table 9), and the environmental benefit optimization results (Supplementary Table 8). By varying the key parameters in each benefit up or down by 10%, we evaluated their influence on the optimization outcome. This analysis aims to clarify the sensitivity of the optimal solution to different parameters and to further assess the robustness of the optimal solution.

Cropland carrying capacity and surplus

Livestock and cropland associated with grazing were not included in the monitoring system because grazing was not included in China’s livestock pollution prevention regulations. The total amount of N excreted by regional animal manure was calculated based on the livestock production in the statistical data and the N excreted by livestock. We use the pig equivalent as a standard unit to measure the nitrogen excretion levels of livestock. Specifically, one pig is defined as one pig equivalent, with a nitrogen excretion rate of 11 kg per pig equivalent. After deducting various nitrogen losses, the available manure nitrogen is 7 kg per pig equivalent. Animal numbers across various categories were standardized by converting them into pig equivalents. Based on the technical guide for measuring the cropland carrying capacity of animal manure published by the Chinese Ministry of Agriculture and Rural Affairs in 201852, the terms of stock were: 100 pigs equal 2500 poultry, 250 sheep, 30 beef cows, or 15 cows. And then the nutrient excretion was estimated using the average nitrogen and phosphorus output associated with each livestock type. The manure N supply was:

$${N}_{m}=\left({N}_{{{\rm{p}}}}+\frac{{100\times N}_{{{\rm{d}}}}}{15}+\frac{100\times {N}_{{{\rm{b}}}}}{30}+\frac{{100\times N}_{{{\rm{s}}}}}{250}+\frac{100\times {N}_{{{\rm{po}}}}}{2500}\right)\times 7$$
(18)

where \({N}_{m}\) is total manure N content (kg), \({N}_{P}\), \({N}_{d}\), \({N}_{b}\) \({N}_{s}\) and \({N}_{{po}}\) are the year-end inventory quantity of pig, cow, beef cattle, sheep, and poultry stock, respectively (head).

$${N}_{{cm}}={\sum }_{i=1}^{n}({A}_{i}\times {F}_{i}\times {R}_{i})$$
(19)

where \({N}_{{cm}}\) is regional cropland demand of manure N at OPSR (kg), \({R}_{{ij}}\) is the OPSR of \(i\) crops, \({F}_{i}\) is N application intensity of crop \(i\) (kg ha−1) in the region, \({A}_{i}\) is the sown area of crop \(i\) (ha) in the region.

$$R=\frac{{N}_{{cm}}}{7}$$
(20)

where R is the regional cropland bearing capacity based on the OPSR for main crops (pig equivalent, head).

$${B}_{s}=\frac{{Nm}-{Ncm}}{7}$$
(21)

where \({B}_{s}\) represents livestock production surplus (pig equivalent, head).