The widening gap between China's urban and rural diets and population size poses new challenges to the sustainable supply of agricultural water, undoubtedly increasing the uncertainty of ensuring China's food security. This study compares water required for food in urban and rural areas from 1981 to 2016 using data collected from multiple sources and projects the water required amount in urban and rural areas based different diet scenarios. The results show that food consumption patterns in both urban and rural areas gradually changed from a vegetable-dominated diet to an animal-dominated one in past decades. During 1981–2016, total agricultural water requirements (AWR) for urban residents increased from 167 to 671 billion m3, whereas the for rural residents decreased from 485 to 403 billion m3 at the same period. The urban and rural irrigation water requirements (IWR) shows similar trend to AWR, and increased animal products consumption and decreased grain consumption are the main reason for IWR change in urban and rural areas, respectively. Furthermore, under current dietary patterns, national IWR will reach to 249 billion m3 when the expected population peak occurs (in 2032). However, if according to the recommended diet, China needs to consume 24–41 billion m³ more irrigation water to meet national food demand, and this value will exceed the upper limit allowed by China’s water policy. This study also proposes some measures to ensure China's agricultural water security based on presented findings.