The rise in urban population, accompanied by growing poverty and hunger, has triggered debates on the relevance of urban agriculture in addressing the challenges of food insecurity in urban centres. This article examines the effects of urban planning practice on urban agriculture (UA) in Ilorin, Nigeria, and how it has contributed to improving the resilience of the city to food shock. Adopting a cross-sectional survey design, primary and secondary data were used. A structured questionnaire was used to obtain primary data from randomly selected urban farmers. Secondary data were obtained from the publications of the Central Bank of Nigeria, the National Bureau of Statistics, and the Food and Agricultural Organization. Data collected were analysed using descriptive statistical techniques. Respondents’ Agreement Index (RAI) was used to measure the variables influencing the performance of UA. Findings revealed that UA contributed 16.9% to meat/fish/egg requirements in the city; 4.5% to yam/cassava/potato requirements; 0.58% to vegetable requirements; 0.6% to fruit requirements, and 0.5% to grain requirements. RAI results indicated poor access to finance (0.93), limited land area (0.75), and lack of tenure security (0.44) as the dominant variables influencing the poor contribution of UA to food security. It is recommended that UA be integrated into urban planning and that more land for farming be provided