Following the rising wave of terrorism in Africa, particularly in the last decade, this study investigated the effect of terrorism on economic complexity in the region as well as the moderating role of military expenditure in the terrorism–economic complexity relationship. A panel of 34 African economies was used over the period 2010–2021. The study also used the dynamic system generalized method of moments framework. We find that the unconditional effect of terrorism on economic complexity in Africa is predominantly negative and significant, and that military expenditure in the region has been ineffective in moderating this adverse effect. This finding remained robust regardless of whether terrorism is measured by the number of terrorism incidents, fatalities, injuries, or hostages. However, our results showed that industrialization, urbanization, and governance institutional quality are potent channels for promoting economic complexity in Africa. Among others, the study emphasized the need for policymakers and leaders in Africa to collaborate at the level of the African Union to address the detrimental effects of terrorism on the continent.