Alcohol-blended gasoline is recognized as an effective strategy for reducing carbon emissions during combustion and enhancing fuel performance. However, the carbon footprint associated with its production process in refineries deserves equal attention. This study introduces a refinery modeling framework to evaluate the long-term economic and environmental performance of utilizing alcohols derived from fossil, biomass, and carbon capture sources in gasoline blending processes. The proposed framework integrates Extreme Learning Machine-based models for gasoline octane blending, linear programming for optimization, carbon footprint tracking, and future trends in feedstock costs and carbon taxes. The results indicate that gasoline blended with coal-based alcohol currently exhibits the best economic performance, though its carbon footprint ranges from 818.54 to 2072.89 kgCO2/t. Gasoline blended with biomass-based alcohol leads to a slight reduction in benefits and an increase in the carbon footprint. Blending gasoline with CCUM (CO2 capture and utilization to methanol) results in the lowest economic performance, with a gross margin of 8.91 CNY/toil at a 30% blending ratio, but achieves a significant 62.4% reduction in the carbon footprint. In long-term scenarios, the additional costs brought by increased carbon taxes result in negative economic performance for coal-based alcohol blending after 2040. However, cost reductions driven by technological maturity lead to biomass-based alcohol and CCUM blending gradually showing economic advantages. Furthermore, owing to the negative carbon emissions characteristic of CCUM, the blending route with CCUM achieves a gross margin of 440.60 CNY/toil and a gasoline carbon footprint of 282.28 kgCO2/t at a 20% blending ratio by 2050, making it the best route in terms of economic and environmental performance.