CO2 emissions are major drivers of climate change, causing global warming, extreme weather, and biodiversity loss. They disrupt ecosystems, deplete resources, and threaten public health and economic stability. Reducing CO2 emissions is essential for climate stability and sustainability. This study explores the complex relationships between CO2 emissions and factors such as the transportation sector, electricity consumption, foreign direct investment (FDI), international trade, and gross domestic product (GDP). The focus is on small- and medium-sized enterprises (SME) in Pakistan. Using time series data from 2000 to 2022. This study applies advanced econometric techniques, including nonlinear autoregressive distributed lag (NARDL), dynamic ordinary least squares (DOLS), and fully modified ordinary least squares (FMOLS). The findings highlight that increased electricity consumption, international trade, transportation activities, and FDI contribute to higher CO2 emissions. However, FDI can also help reduce emissions, particularly through investments in green technologies. This study emphasizes the importance of transitioning to renewable energy and adopting sustainable practices across sectors such as electricity, trade, and transportation. Specifically, transportation and electricity consumption were found to significantly impact CO2 emissions, with a 10% increase in transportation activities resulting in a 5% rise in emissions. Conversely, FDI can reduce emissions by approximately 3% per unit of investment, largely due to green technology adoption. Additionally, integrating renewable energy and energy-efficient technologies in transportation can lead to a 20% reduction in emissions. Policymakers and experts must prioritize strategies that promote renewable energy adoption and integrate sustainable practices to reduce CO2 emissions and ensure long-term environmental sustainability. This research is innovative in its analysis of the interconnected effects of electricity consumption, trade, transportation, and FDI on CO2 emissions. By applying sophisticated econometric methods, it highlights the potential of FDI, particularly green investments, to mitigate environmental damage. This study, focusing on Pakistan, offers insights into how economic growth can be balanced with environmental sustainability.