In recent years, the carbon dioxide emissions generated by the massive consumption of fossil energy have been increasing year by year, resulting in more and more obvious greenhouse effect, and the occurrence of climate disasters around the world has become more and more frequent. This study analyses the long-term effects of economic growth, trade, foreign direct investment (FDI) and gross domestic product (GDP) on carbon dioxide (CO2) emissions in Latin American countries that are in the middle-income trap (MIT). Using annual time-series data for the period 2000–2020, the results of middle-income countries of Latin America are compared with higher-income countries (Singapore, the United States, and South Korea) and an upper-middle-income country, China. Specifically, we examine the role of sector value addition to GDP on the CO2 emission nexus for middle-income economies, controlling for the effects on GDP, FDI, and trade. Using regression and path analysis (multiple regression) we find that for higher-income countries FDI, GDP and trade are the important variables that have a strong positive impact on CO2 emission, but that positive impact is weak in MIT countries, which makes this study significant as it highlights important variables needed for MIT countries to remain focused. Autoregressive distributed lag (ARDL) model results also explore that FDI, GDP growth and trade variables can significantly accelerate the environmental quality by CO2 emission, while tourism/travel services and education do not much impact the environment. Hence, our paper provides solid ground for developing a sustainable and pro-growth policy for MIT countries because they are plagued by the decline or stagnation of economic growth.