China's urbanization has gradually become the dominant factor in farmland loss, but it remains unclear how urbanization impacts the supply-demand relationship of agroecosystem services at different rates of farmland loss, which in turn poses new challenges to the ecological security of farmland. Taking the Huaihe River Basin as a case, this paper analyzes farmland loss from 2000 to 2020, as well as changes in the supply-demand rela-tionship of four types of agroecosystem services: food production, socio-economic security, carbon sequestration, and soil conservation, revealing the driving mechanisms of urbanization on the supply-demand relationship of agroecosystem services in sub-regions with different rates of farmland loss. The results show that: (1) A total of 13588.11 km2 of farmland was converted to construction land from 2000 to 2020, accounting for 75.62 % of the total amount of farmland converted to different land types, and 95.57 % of the total amount of farmland con-verted to construction land. (2) There was a surplus supply of grain production services and socio-economic security services, while there was a deficit in the supply of carbon sequestration services, and a balance in the supply-demand of soil conservation services. (3) The matching degree of supply-demand for agroecosystem services was lower in the Rapid Loss Area compared to the Medium Loss Area and Slow Loss Area. (4) Urban-ization was divided into population, economic, and spatial urbanization. The supply-demand relationships of agroecosystem services were impacted greatly by spatial urbanization in the Rapid Loss Area and by economic urbanization in the Medium Loss Area and Slow Loss Area.