To investigate the impact of solar energy on the carbon footprint, to find effective measures to reduce the carbon footprint and slow global warming as soon as possible, this paper takes 30 provinces in China as an example. First, the inter‐regional input–output model is used to calculate the carbon footprint of each province. Then, the panel quantile regression model is used to investigate the impact of solar energy generation on different quantiles of carbon footprint. The results show that from 2012 to 2020, China's carbon footprint is at a high level, which is not conducive to the achievement of the goal of peaking carbon dioxide emissions. The eastern region has the highest carbon footprint, followed by the western region, the central region has the lowest carbon footprint, and its carbon footprint proportion continues to decline. The increase of solar energy generation can significantly reduce the carbon footprint of high quantile location, but has no significant impact on the carbon footprint of the middle and low quantile locations. Except for the negative impact of afforestation area on carbon footprint, the others control variables are all positive. Therefore, to reduce the carbon footprint of China, it is necessary to upgrade solar technology, increase solar energy generation, reduce energy consumption per unit of GDP (Gross Domestic Product) and the share of coal consumption, strengthen forestry management and reduce reliance on private vehicles.