It is imperative to assure sustainable development and achieve the carbon neutrality goal to solve the pressing issue of climate change and environmental damage. Therefore, this study examines the impact of export, import, renewable, and nonrenewable energy consumption, economic growth, and population on CO2 emissions for 32 developing countries from 1990 to 2020, with a focus on achieving the carbon neutrality goal of 2050. The study used the fixed effect regression model, the two-step generalized method of moments (GMM), and the quantile regression model to investigate the impact of these variables on CO2 emissions. The empirical result indicates that exports, renewable energy consumption, and the square of economic growth significantly mitigate CO2 emissions, whereas imports, nonrenewable energy consumption, population, and economic growth positively and significantly increase CO2 emissions in developing countries. Besides, the study supports the existence of an inverted U-shaped EKC in developing countries. The Dumitrescu and Hurlin (DH) panel causality test results indicate bidirectional causality running from export, import, renewable energy consumption, nonrenewable energy consumption, economic growth, population, and the square of economic growth to CO2 emissions, respectively. Based on the empirical findings, the study proposed policy recommendations.