There is growing evidence of urban poverty in and around cities in sub-Saharan Africa in the form of food and nutrition insecurity. Although many studies have been done across sub-Saharan Africa on urban agriculture, food and nutrition insecurity, little is known about the association of urban agriculture to household food and nutrition insecurity along the urban–rural continuum, especially in West African cities. Therefore, a survey was carried out between August and September 2014 in and around Ouagadougou (Burkina Faso), using a transect approach to guide the data collection. The purpose of this study was to understand the dynamics of urban, periurban and rural agriculture and its association with household food and nutrition insecurity. A total of 240 households participated in the survey. From these households, data were collected on 179 women of reproductive age (15–49 yr) and 133 children under the age of 5 yr to compute Women's Dietary Diversity Scores (WDDS) and other anthropometric indices. The results of this study provide a general picture of crop production which is inclined to subsistence and income generation. Households in rural and periurban areas were more engaged in crop and livestock production compared with their urban area counterparts. Households in periurban areas had the highest relative proportion (54%) of food insecurity (household food insecurity access scale (HFIAS) > 11), compared with urban areas (39%) and rural areas (45%). At the same time the periurban households had the highest relative proportion of stunting and wasting prevalence compared with urban and rural households. Households in the rural areas had the highest dietary diversity (WDDS ≥ 6), compared with periurban and urban households. Households keeping livestock significantly experienced less wasting (weight-for-height index (WHZ)) (coef = −0.15; P = 0.008) by a factor of 0.15, and overweight (body mass index (BMI)-for-age (BAZ)) (coef = −0.12; P = 0.015) by a factor of 0.12 compared with households not doing livestock keeping. Households involved in crop production significantly experienced more food insecurity, HFIAS (coef. = 2.55; P = 0.042) by a factor of 2.55 compared with households without crop production. The complexity of periurban areas coupled with the scourge of food and nutrition insecurity will require more periurban agriculture and food policy consideration.