In Africa, water resources pervade multiple sustainable development goals (SDGs), which mainly focus on eliminating poverty (SDG 1) and hunger (SDG 2), promoting good health and well-being (SDG 3) and supporting clean water and sanitation (SDG 6). Africa's water scarcity problems have been worsened by population growth and climate change. Agriculture is the largest consumer of water in Africa, and a clear understanding of the water-food nexus is necessary to effectively alleviate water-related pressures on food security. Water footprint (WF) accounts and decompositions provide insights into water management planning for policy-makers. We investigated the WF of food consumption from 2000 to 2018 in 23 African countries and used the logarithmic mean Divisia index (LMDI) to decompose its driving forces into consumption structure, per capita food consumption, water intensity and population effect. The WF of food consumption increased from 609.8 km3 in 2000 to 1212.9 km3 in 2018, with an average annual growth rate of 3.7%. The population effect contributed most to this change (64.6%), followed by per capita food consumption (28.3%) and consumption structure (7.1%). Cereals (46.7%) and livestock (24.4%) were the major contributors to the increase in the total WF. Our findings highlight that controlling population growth and improving water efficiency are effective measures to relieve water-related pressures on food consumption. However, a healthy dietary structure must also be promoted because Africa's current dietary energy level is below the global average. Moreover, nine countries in the research area have an inadequate supply of dietary energy; this will inevitably drive the WF of food, as calories increase and diets change. This study is helpful for understanding the water-food nexus in Africa and provides strategies to conserve water and enhance food production.