Somalia faces severe environmental challenges, including overdependence on nonrenewable energy, deforestation, and rapid population growth, exacerbated by poor governance and weak institutional capacity. As one of the most climate-vulnerable nations, Somalia’s environmental sustainability is crucial for its long-term economic and social stability. Given this background, this study examines the dynamic impact of economic growth, energy consumption, education, and population density on Somalia’s ecological footprint using annual data from 1990 to 2020. Employing ARDL and DOLS models, the findings confirm a long-run cointegration relationship among the scrutinized variables. The results indicate that energy consumption significantly increases ecological pressures. In contrast, education mitigates environmental impacts. Additionally, population density is found to intensify ecological stress in both the short and long run. Unlike many countries, Somalia does not exhibit the Environmental Kuznets Curve hypothesis, highlighting the urgent need for targeted policy interventions. By considering these outcomes, this study proposes adopting renewable energy, integrating environmental education, and implementing sustainable urban and economic strategies to alleviate ecological pressures and ensure long-term environmental sustainability. Moreover, the findings provide critical insights for policymakers in Somalia and other developing economies facing similar environmental challenges. © The Author(s) 2025.