Rapidly demographic aging substantially affects socioeconomic development 1-4, presents grand challenges for food security and agricultural sustainability 5-8, which have so far not been well understood. Here, by using over 30,000 households survey across China, we show that rural population aging lowers average education level of farmers by 3% (0-11% across different provinces) and reduces farm size by 4% (2-11%) due to land transfer-out and abandonment in 2019. These changes further led to a reduction of agricultural inputs, including fertilizers and machinery, which decrease agricultural output by 4% and labor productivity by 9%. Meanwhile, fertilizer use efficiency is reduced by 3%, while increasing fertilizer-related pollutants emission to the environment. New farming models, such as cooperative farming, tend to have larger farm sizes and being operated by younger farmers, who have a higher average education level, hence reducing total labor requirement. Without policy interventions, agricultural output, labor productivity and fertilizer use efficiency would decrease by 3-16% as a consequence of population aging by 2100, compared to 2019 levels. With policy measures, such as new farming models, this decrease could be reversed and in fact an increase by approximately one-third achieved in the same time period. Our analyses suggest that population aging effects on agriculture could be effectively addressed through labor saving in large-scale new farming models, further contributing to a widespread transformation of smallholder farming to sustainable agriculture in China.