Since the Chinese government proclaimed the “double carbon” goal in 2020, carbon emissions reduction has become an important task for the Chinese government. Cities generate more than 60% of carbon emissions. There are many challenges in achieving the “double carbon” goal for the cities of China. Science and technology innovation (STI) provides a feasible path, and the mechanism of STI influencing carbon emissions is analyzed. The STI factors, economic factors, energy factors, and population factors are studied based on the generalized Divisia index method. According to the decomposing results, science and technology innovation investment is the most important increasing factor in carbon emissions, and technology innovation investment efficiency is the most important decreasing factor, respectively. Three scenarios are set up and simulated with Monte Carlo technology evaluating the city of Xi’an in China. Under the baseline development scenario, it cannot achieve the carbon peak goal, and the uncertainty of carbon emissions increases. Under the green development scenario, it will peak in 2051, with a 95% confidence interval of 6668.47–7756.90 × 104 tons. Under the technology breakthrough scenario, the lower and median boundaries of carbon emissions peak at 4703.94 × 104 tons and 4852.39 × 104 tons in 2026, and the upper boundary peaks at 5042.15 × 104 tons in 2030. According to the Environmental Kuznets Curve theory, it will peak between 2028 and 2029 with a GDP per capita of CNY 153,223.85. However, it will fail to achieve the carbon neutrality goal by 2060, and should rely on the national carbon trading market of China to achieve the goal with a trading volume of 2524.61–3007.01 × 104 tons.