Urbanization is transforming food systems across sub-Saharan Africa and South Asia. Increases in economic inequality, combined with growing urban populations, are expected to pose a risk to future food security. This paper shows that while anticipated increases in food demand by 2050 can largely be met regionally, potential yield increases or diversification will not contribute automatically to inclusive rural transformation. Instead, urbanization may potentially increase rural inequality and poverty. Smallholder farmers located close to expanding cities risk losing their land to urbanization, while people living in rural areas far from growing urban food markets who lack access to inputs, information, and markets are at risk of losing out. For all rural food system actors to profit from growing urban markets, the patterns of urbanization, the quality of rural-urban linkages, and the functionality of secondary towns are crucial. Physical and communicative proximity to urban markets means better access to finance, inputs, information, and services. Furthermore, off-farm employment opportunities can arise in the developing value chains. To realise the opportunities, this paper identifies a range of social, physical, spatial, economic and institutional conditions that enable inclusive rural transformation