As it is known, CO2 is a greenhouse gas. Greenhouse gases contained in fossil fuels mix with the atmosphere and cause global warming on earth. Global warming causes many negative situations such as irregular rainfall, drought, difficulties in accessing fresh water, and changes in living biology. Thus, life on earth is becoming increasingly threatened. In this study, the relationship between CO2 emissions and renewable and fossil-based energy use, which are among the factors affecting economic growth, was applied in G-20 countries with panel data analysis. The data of the study were collected from the World Bank. A total of 589 data were studied in 19 countries and 31 time dimensions. AMG method was used for long-term estimation of the data by performing cross-section dependence, unit root tests and homogeneity tests. Granger causality test was performed between the variables. A positive relationship was found between GDP growth and CO2, and it was found that a one-unit increase in CO2 use would cause a 0.88-unit increase in GDP growth. Additionally, the study found that there is a unidirectional causality from renewable energy, fossil energy consumption and CO2 usage to GDP growth.