1 Introduction

The urgent need to reduce the inequality, as highlighted in the 10th goal of the Sustainable Development Goals (SDGs) [58], underlines the fact that this issue deserves global attention and that solutions must be found to address this inequality. Simultaneously, in this era of climate change mitigation, many countries have acknowledged and addressed the urgency of reducing CO2 emissions [23, 37, 56, 71, 96, 101], and these countries have also actively shouldered the responsibility of mitigating CO2 emissions through Nationally Determined Contributions (NDC) [36, 49, 91]. Nonetheless, the phenomenon of carbon inequality (CI) is pervasive and has become an issue that requires urgent attention [48, 74, 97]. Specifically, the disparity of CO2 emissions among different areas or groups gradually shapes CI. For example, inequality of CO2 emissions can be induced by international trade between economies and countries [29, 72, 102], the inequality of CO2 emissions varies according to different age structures and income levels [33, 43, 44, 78], and inequality of CO2 emissions exists between urban and rural areas [26]. The former two topics of CI have received attention from scholars, while the latter urban-rural gap still requires in-depth discussion. In particular, the dual urban-rural structure in China makes urban-rural CI a special problem [93], and is contrary to the principle of regional and provincial coordinated and sustainable development.

There is consensus that in past decades, the digital economy in China has developed vigorously and prosperously [59, 63, 90]. Many breakthroughs have been achieved in digitization and digital technology [38, 81]. Moreover, information and communication technology (ICT) has become a pillar industry in the national economy [64]. Digital economy development (DED) has also caused various impacts on society, the economy, and energy. Specifically, DED has improved enterprises’ financial performance by providing less stringent financial constraints [6, 76, 84], stimulating the vitality of the capital market [54], and driving the development of energy transition and clean energy promotion [10, 80]. DED has also optimized the employment and industrial structures [30, 75], encouraged people to migrate from the rural areas, and led to urban development [103, 104]. Moreover, DED has enhanced the ability of governments to govern [16, 59]. More importantly, there is consensus in the literature that DED inhibits CO2 emissions [42, 82, 83], but whether DED can contribute to the mitigation of CI is still uncertain.

The main reason for the inequality of urban and rural CO2 emissions lies in the misplacement of the allocation of energy factors and productive factors [43]. To be more specific, with more solid economic and infrastructural bases, as well as urbanization leading to some people migrating to urban areas, production activities have become highly agglomerated in these areas, leading to more energy demand and a corresponding increase in CO2 emissions [44]. Although CO2 emissions in the rural areas are obviously less than those in the urban areas, they also give rise to the serious problem of energy poverty [9, 12, 95]. Put differently, many rural residents have scant access to clean energy for cooking and heating in their daily lives [21, 94]. Conversely, a large proportion of rural people use mainly primary energy such as firewood for cooking and heating. In a nutshell, the energy utilization rate in the rural areas is relatively lower than that in the urban areas. In this case, DED is conducive to promoting the rational allocation of energy and production factors. On the one hand, in the rural areas, with the help of the digital economy platform, DED is useful in absorbing and collecting more social capital into the financial market, thus widening the financing channels of small and medium enterprises (SMEs) and promoting their green transformation [22]. In addition, DED helps to lower the loan threshold for rural residents, facilitating their ability to take out loans for clean energy equipment such as solar water heaters [90]. On the other hand, in the urban areas, DED is conducive to strengthening the regulation of enterprises and firms’ pollution and CO2 emissions [16]. By integrating digital economy into financial institutions and government regulators, it is possible to realize overall regulatory and supervision coverage in the whole process of production, trading, and circulation. By raising the financing threshold of high-pollution enterprises and firms, environmental financing constraints can be achieved, which can further promote the optimization of urban investment and industrial structures.

Based on the above analysis, we believe DED may be able to reduce the disparity of CO2 emissions in China’s urban and rural areas and promote the coordinated development of these two areas. Therefore, we want to examine the relationship between DED and CI using empirical regressions. Moreover, considering that different provinces in China may have various capital endowments, we also want to figure out whether the DED-CI nexus is heterogeneous or not. Additionally, if the negative relationship between DED and CI is significant, then we wonder how DED affects CI, and whether some factors affect the DED-CI nexus. However, the current literature has largely overlooked these issues. To investigate these issues, we first evaluate the situation of CI in 30 provinces in China; based on these scores of CI, we conduct an empirical analysis to reveal the nexus between DED and CI. We also divide sample provinces into several groups according to their capital endowment, and figure out the heterogeneous impact of DED on CI in terms of capital characteristics. Further, we examine the potential moderating and mediating variables to show the impact channels.

This paper’s contribution lies in several points. First, while previous research has explored the trade-induced inequality of carbon emissions between developed and developing countries, as well as CI among different income and age groups, scholars have paid scant attention to the inequality of carbon emissions between urban and rural areas within provinces. Additionally, few studies have connected the topic of DED to CI. Thus, this study represents a pioneering research endeavor investigating the impact of DED on CI in China, which is valuable for proposing measures to address CI from the perspective of DED. Second, the development levels across China’s provinces, including disparities in social and human capital accumulation vary, a factor researcher have often overlooked. Hence, we emphasize the heterogeneous impact of DED on CI in provinces with different levels of social and human capital endowments, which is helpful for policymakers in identifying specific targeted policies according to local capital levels. Third, this paper examines the moderating role of rural residential disposable income in the nexus between DED and CI and identifies a synergistic effect between rural residential disposable income and DED on CI, which provides valuable insights for the government in its efforts to alleviate the CI phenomenon by enhancing rural residential disposable income. Moreover, two impact channels, namely environmental regulation and technology innovation, are identified, which contributes to a better understanding of the nexus between DED and CI.

The subsequent sections of this study are organized as follows. Section 2 summarizes the current literature and identifies the research gap. Section 3 introduces the necessary methodology and data. Section 4 analyzes the baseline regressions results and heterogeneous effect. Section 5 presents moderating and mediating effect analysis. Section 6 concludes this paper and provides policy implications.

2 Link to the literature

2.1 Research on digital economy development

In recent years, a growing body of scholars has shed light on the issue of DED. Many scholars focus on the measurement of digital economy. For example, Pan et al. [52] propose to measure digital economy from the aspects of infrastructure, industrial scale, and spillover value. Among them, infrastructure emphasizes the internet penetration rate, industrial scale refers to the development of high-tech industries, and spillover value lies in the added value of tertiary industry. Similarly, infrastructure, social impact, innovation and application, and economic growth and jobs are considered the four pillars in the indication system of digital economy in Wang et al. [62]. Moreover, around these four aspects of the digital economy, Wang et al. [62] select a total of 21 sub-indicators to measure the development status of the digital economy in China. By comparison, Chen [10] adopts a simpler way which concentrates only on five sub-indicators: telecommunication business revenue, the number of employees in the digital economy sector, the number of broadband internet subscribers, the number of mobile phone subscribers, and the financial inclusion index.

Moreover, many studies have referred to the positive social and economic effects of digital economy. Xue et al. [80] investigate the impact of DED on energy consumption, and focus mainly on the scale and structure of energy consumption. Their results show that DED not only increases the scale of energy consumption, but also promotes the optimization of the energy consumption structure. Based on provincial level data in China during the period 2011–2020, Wang et al. [70] reveal a positive effect of DED on urban-rural integration development. By using a similar dataset (i.e., the provincial-level dataset in China from 2010 to 2020), Li et al. [41] demonstrate that DED is a driving force for green investment, particularly in western China. Guo et al. [28], in identifying the nexus between DED and high-quality urban economic development, declare that DED is crucial for high-quality urban economic growth. They also find that human capital and green technology innovation are two important channels through which DED affects high-quality development of urban economy.

2.2 Research on carbon inequality

In recent years, the topic of CI has attracted the attention of some researchers [26, 74, 85, 97]. First, the current literature has explored the trade-induced inequality of energy and CO2 emissions. By applying the multi-regional input-output (MRIO) model, most of the current literature on the topic of CI investigates this phenomenon during the international trade process. For example, Zhu et al. [102] focus on consumption-based CO2 emissions in international commodity trade by using the MRIO model. Furthermore, Wang et al. [72] point out that while global trade brings economic benefits to trading countries, it also makes them bear environmental costs. Therefore, the literature compares the economic gains and environmental losses of these trading countries by investigating embodied CO2 emissions and the added value of commodities [43]. An obvious conclusion has been reached that for developing countries, environmental losses far outweigh their economic interests from trade. While for developed countries and high-income economies, the increased welfare of their economic interests is greater than their decreased welfare from the deterioration of environmental quality [29, 33, 69]. This means that in international trade, some low-income countries are pollutant absorbers, while developed economies tend to export pollution and CO2, leading to disparities in trade-induced CI.

Second, some scholars investigate the CI topic from the aspect of household carbon emissions. Mi et al. [48] use the Gini coefficient method to calculate CI in China’s households according to various levels of income, and find that high-income households tend to generate more CO2. Wang et al. [67] and Liu et al. [44] adopt the same method and link the issue of CI with the different income levels of these households.

Other research investigates the influencing factors of CI. To be more specific, Xu et al. [78] find that industrialization, investment, and energy efficiency are three main factors that contribute to decreasing CI, while energy intensity can exacerbate CI. Similarly, Xu [77] investigate the driving factors of CI from the aspect of industry, technology, and energy.

2.3 Research on the nexus between the digital economy and inequality

Several studies have documented the relationship between DED and environmental inequality or income inequality. To be more specific, Li et al. [40] conclude that DED is effective in inhibiting environmental inequality among different regions. By using the Theil index, the authors first calculate environmental inequality in terms of industrial waste emissions in China. Then, they find that the linkage between DED and environmental inequality is stronger in high pollution areas. A study by Martynenko and Vershinina [47] examines the impact of DED on sustainable development and investigates the inequality phenomenon in society and the environment. Specifically, the authors reveal that DED is essential in reducing and narrowing unequal and unevenly distributed environmental and social risks,thus, showing a positive impact on reducing inequality. In addition, Hodula [32] shows that DED and financial inclusion play significant roles in reducing income inequality. Similarly, Wang and Chen [68] construct an integrated framework including resource dependence, DED, income inequality, and pollution to examine the role of DED and income inequality on environmental pollution in China’s cities during the period 2011–2018. Moreover, they highlight that DED affects pollution and resource dependence through the mediating variable of income inequality. Furthermore, based on data of 108 countries around the world, Xu and Zhong [79] reveals that digitization is essential in alleviating the negative impacts of income inequality on the environment and energy.

2.4 Literature gaps

Based on the literature review, on the one hand, the current literature focuses mainly on CI between trading countries and economies, while neglecting CI within a smaller regional scope, for example, the inequality of carbon emissions within a specific province and between urban and rural areas. On the other hand, although the current literature has explored the DED-inequality nexus, most studies have covered the impact of DED on income inequality or environmental inequality, while the impact of DED on CI has received scant attention from scholars. Hence, we believe that the literature has neglected to investigate the impact of DED on CI or that the relationship between DED and CI can be moderated by other factors. A matter that deserves further investigation is the heterogeneity of the DED-CI nexus in different provinces in China.

3 Methodology and data

3.1 Methodology

This study aims to explore the CI-reduction effect of DED. To this end, we employ carbon inequality as the dependent variable and the development of the digital economy as the core independent variable. We also consider other control variables, including economic development, industry development, urban and rural difference, and investment. Specifically, a concrete specification revealing the relationship between CI and DED can be shown as follows:

$$CI_{{{\text{it}}}} = f(DED_{it} ,GDP_{it} ,SER_{it} ,URP_{it} ,FDI_{it} )$$
(1)

where \({CI}_{it}\) denotes the inequality of carbon emissions, and \({DED}_{it}\) shows the level of digital economy development. Simultaneously, we add economic growth, the ratio of tertiary industry output to secondary industry output, the urban and rural population structure, and foreign direct investment, which are represented by \({GDP}_{it}\), \({SER}_{it}\), \({URP}_{it}\), and \({FDI}_{it}\), respectively. Notably, subscript \(i\) is our study sample individual, namely 30 provinces in China, while subscript \(t\) is the sample period – 2006–2019.

To transform the above relationship into an econometric estimation model, we take the natural logarithm of each variable; hence, we get the following formation.

$$\begin{gathered} \ln CI_{{{\text{it}}}} = \beta_{0} + \beta_{1} \ln DED_{it} + \beta_{2} \ln GDP_{it} + \beta_{3} \ln SER_{it} + \beta_{4} \ln URP_{it} + \beta_{5} \ln FDI_{it} \hfill \\ + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(2)

The connotation of the above variables is the same as those in Eq. (1); however, Eq. (2) shows more information about the estimated parameters. Specifically, the parameters \({\beta }_{1}-{\beta }_{5}\) are our main focus. Among them \({\beta }_{1}\) represents the marginal impact of DED on CI, which we expect to be negative. In other words, we assume that the increase in DED is related to the decrease in CI. In addition, \({\beta }_{0}\) is the constant term and \({\varepsilon }_{it}\) is the error term. Also, we consider both the time fixed effect and the individual fixed effect, which are denoted as \({\pi }_{i}\) and \({\mu }_{t}\), respectively.

Furthermore, the level of CI may be hysteretic; put differently, the degree of CI in the previous year may affect the degree of CI in the current year, and a time series correlation may exist between the two because the carbon emissions of a region are closely related to its economic and social activities, and the economic and social development of a region is difficult to change significantly in the short term [88]. Hence, it is reasonable that CI has a time series correlation. In view of the characteristics of CI, this paper selects an econometric model that is suitable for dynamic evaluation, namely the generalized method of moments (GMM) model [3]. In traditional estimation models, such as the Ordinary Least Squares (OLS) and Fixed Effect (FE) models, if the lag term is directly added to the model, it will cause endogenous problems and then lead to biased estimation [89]. Compared with traditional static econometric models, the dynamic econometric model, namely the GMM model, is an innovative method that can provide accurate and efficient estimation results by taking the lag terms of the dependent variable as the instrument variable to deal with endogenous problems [19, 31]. To be more specific, in this paper the system-GMM (SYS-GMM) method is introduced as the estimation approach, which is used widely in existing research on the topics of environmental economics and resource economics [4, 100]. Another similar model is the differential-GMM (DIF-GMM), which also has the ability to get accurate estimation results in dynamic series [2], nonetheless, SYS-GMM is preferred to DIF-GMM in that the former is more efficient [87].

$$\begin{gathered} \ln CI_{{{\text{it}}}} = \beta_{0} + \beta_{1} \ln CI_{i,t - 1} + \beta_{2} \ln DED_{it} + \beta_{3} \ln GDP_{it} + \beta_{4} \ln SER_{it} + \beta_{5} \ln URP_{it} \hfill \\ + \beta_{6} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(3)

where \({CI}_{i,t-1}\) is the level of CI in the previous year relative to \({CI}_{i,t}\), and the coefficient of \({CI}_{i,t-1}\) reveals its hysteretic impact. Moreover, we are most concerned about the parameter \({\beta }_{2}\) and believe it is negative.

3.2 Variables and data

We calculate the dependent variable using the Theil index method, which is a current mainstream method for assessing inequality in the topics of income, expenditure, wealth, education, energy, and the environment [5, 13, 15, 24, 25, 34, 46, 92]. The Theil index is useful for measuring inequality within a certain region or between rural and urban areas. Because China’s dual urban-rural structure is obvious and is related to unequal economic development, it is essential and interesting to explore the inequality of carbon emissions between these two areas [93]. Specifically, we first get the data on carbon emissions in China’s urban and rural areas from the China Emission Accounts and Datasets [8]. Referring to Zhao et al. [93], we calculate urban-rural carbon emissions inequality using the following equation.

$$\begin{gathered} Inequality_{it} = \sum {\left( {\frac{{CE_{ijt} }}{{CE_{it} }}} \right) \cdot \ln \left[ {(\frac{{CE_{ijt} }}{{CE_{it} }})/(\frac{{POP_{ijt} }}{{POP_{it} }})} \right]} \hfill \\ = \left( {\frac{{CE_{iat} }}{{CE_{it} }}} \right) \cdot \ln \left[ {(\frac{{CE_{iat} }}{{CE_{it} }})/(\frac{{POP_{iat} }}{{POP_{it} }})} \right] + \left( {\frac{{CE_{ibt} }}{{CE_{it} }}} \right) \cdot \ln \left[ {(\frac{{CE_{ibt} }}{{CE_{it} }})/(\frac{{POP_{ibt} }}{{POP_{it} }})} \right] \hfill \\ \end{gathered}$$
(4)

where \(i\) represents the province, and \(t\) the year. \(j\) represents an urban area when \(j\) equals a, and a rural area when \(j\) equals b. In this regard, \({CE}_{iat}\) denotes the carbon emissions in urban areas in province \(i\) and year \(t\), and \({CE}_{ibt}\) denotes the carbon emissions in the rural areas in province \(i\) and year \(t\). Similarly, \({POP}_{iat}\) denotes total population in the urban areas in province \(i\) and year \(t\), and \({POP}_{ibt}\) denotes total population in the rural areas in province \(i\) and year \(t\). Hence, the CI of 30 provinces in China is obtained.

Subsequently, we draw the corresponding figure to present the level of CI during the period 2006–2019 (see Fig. 1). On the one hand, there is a clear declining trend in CI over time, indicating that this negative phenomenon has eased. On the other hand, although the presence of significant disparities in CI between various provinces in China is evident, the gaps have diminished and converged, showing successful advancement of coordinated regional development.

Fig. 1
figure 1

The level of CI in China during the period 2006–2019

With regard to the independent variable (i.e., \(DED\)), evaluating the digital economy from the perspectives of both the supply side and demand side provides a comprehensive understanding of its development and social impact. Examining the supply side involves considering factors such as the development of the software and information technology sector, infrastructure, employment, wages, and business volume. This assessment helps gauge the progress of the digital economy, reflecting the transformative effect it has on industries and its contribution to social production. On the demand side, it is crucial to analyze how people utilize and engage with the digital economy. The widespread adoption of digital payment methods, for example, significantly enhances convenience in people’s daily lives. The penetration rate of mobile phones and the internet indicates the extent to which the digital economy is integrated into society. The number of internet users directly reflects the demand for digital economic services. A strong demand for the digital economy not only creates a larger market but also stimulates further innovation and application. Therefore, considering both the supply and demand sides provides a holistic view of the digital economy, encompassing its development, impact, and potential for growth. Based on the above analysis, we construct a comprehensive framework to assess the level of DED in China. We select nine indicators from each side to measure DED, and the framework of a comprehensive digital economy indication system is shown in Table 1.

Table 1 The framework of comprehensive digital economy indication system

After constructing a comprehensive indicator system, we use the entropy weight method to calculate the score of the DED. Figure 2 shows the specific level of DED in each province in China during the period 2006–2019. There are different degrees of DED in the various provinces of China. Specifically, the level of DED in the developed eastern coastal provinces such as Beijing, Shanghai, and Guangdong is high, while in the western regions, such as Gansu and Qinghai, the level of DED is relatively lower. In addition, it is obvious that as time goes by, the level of DED in China shows a significant upward trend.

Fig. 2
figure 2

The level of DED in each province in China during the period 2006–2019

We also consider four control variables which are connected not only with our dependent variable, but are also linked with the core independent variable. They are economic growth (denoted by \(GDP\)); industrial structure transition (denoted by \(SER\)), which is measured by the proportion of added value in tertiary industry to that in secondary industry; the population structure between the urban and rural areas (denoted by \(URP\)), which is measured by the proportion of the urban population to the rural population; and foreign direct investment (denoted by \(FDI\)). Notably, we get the above data on the control variables from the China Statistical Yearbook [14]. Therefore, by employing a panel dataset of provinces in China (we do not include Hong Kong, Macao, Taiwan, and Tibet due to inaccessible data) during the period 2006–2019, we empirically investigate the possible CI-reduction effect brought by DED. Specifically, we list a detailed summary of these variables in Table 2. We also show the distribution characteristics of each variable in Fig. 3. Obviously, the dependent variable shows a decreasing trend over time, while all five independent variables increase over time.

Table 2 Descriptive statistics of the variables
Fig. 3
figure 3

The distribution characteristics of each variable

4 Results analysis

4.1 Panel cointegration test

A panel cointegration test can help determine whether a linear combination of non-stationary variables is stationary or not. Before conducting baseline regressions, we first use the Westerlund ECM Cointegration proposed by Westerlund [73], and present the results in Table 8 in Appendix. The null hypothesis of this test is of no cointegration [27, 98]. Specifically, the statistics of \({G}_{t}\) and \({G}_{a}\) mean that rejecting the null hypothesis should be considered as evidence of cointegration in at least one cross-sectional unit, and the statistics of \({P}_{t}\) and \({P}_{a}\) mean that rejecting the null hypothesis can be considered evidence of overall panel cointegration. Our results indicate that the P-values in \({G}_{t}\) and \({P}_{t}\) are both significant; thus, this test verifies that the independent variables are cointegrated with the dependent variable in all sample provinces.

4.2 Baseline regression results

In this section we analyze the impact of DED on CI based on our preferred estimation model (i.e., SYS-GMM). To be more specific, we add the control variables step by step, and it is obvious that all these control variables we chose are significant (see Table 3). The coefficients of the lag term of CI are all significantly positive, implying that CI in the previous year exerts a positive impact on CI in the current year, which verifies our selection of the estimation model. Moreover, as for the most important variable, namely DED, we find that the coefficients of DED in these four columns are all significantly negative, showing that DED is negatively related to CI. Put differently, the development of the digital economy contributes to the inhibition of CI. Notably, with the gradual increase of control variables, the coefficients of DED do not change much and remain stable. In column (4), the coefficient of DED is -0.6310, which means an increase of DED by 1% can trigger CI to decrease by about 0.6310%. DED helps to reduce people’s high energy consumption lifestyle during their daily life, especially while commuting. By establishing a big data service platform, transportation infrastructure and facilities become more energy efficient and environmentally friendly. At the same time, people can reduce some unnecessary travel and production activities [50, 51], thus reducing carbon emissions in urban areas. In addition, the digital economy is more embedded in tertiary industry and the service industry, so digitization can help promote their development [30, 66, 81]. On the other hand, the high permeability characteristic of digitization can significantly improve the industrial integration of agriculture, manufacturing, and the service industries. From this perspective, DED plays a significant role in upgrading the industrial structure in the rural areas, optimizing the rural development mode [17, 45]. Hence, DED reduces the imbalance of original energy and production factors allocation, thus promoting the balanced development of the urban and rural areas within provinces.

Table 3 Baseline regression results of the impact of DED on CI

When it comes to the control variable, it is notable that GDP, SER, and FDI all positively and significantly influence CI, which is not conducive to mitigating CI. The urban areas have a sounder foundation of economic development, a perfect industrial structure, and complete infrastructure; in contrast, economic conditions in the rural areas are not as advanced as those in the urban areas [60, 61, 99]. Therefore, economic development may widen the urban-rural gap, instead of promoting the balanced and coordinated development of urban and rural carbon emissions when resources are not significantly tilted to rural areas. The same goes for industrial structure. FDI tends to be concentrated in urban areas, particularly in first-tier cities because these cities have a greater presence of foreign-funded enterprises and transnational corporations, which are more likely to attract investment. As a result, there is a higher level of provincial investment in these areas compared to other regions within the province [39]. However, the urban and rural population structure does not exacerbate CI, which may be because CI is not only related to population numbers in the urban and rural areas, but also to the age structure [43].

4.3 Robustness tests

We change some of the control variables and re-estimate Eq. (3) (see Table 4 for the results). To be more specific, we replace the urban and rural population structure with the urban and rural consumption structure. We also change the original control variables of FDI into the transportation turnover rate. From Table 4 we can see that the lag term of the dependent variable still exerts a positive impact on the current dependent variable. Moreover, increasing DED is essential for reducing CI. The coefficient signs of each control variable are also consistent with those in the baseline regressions results. Specifically, GDP, industrial structure upgrading, and transportation show significant aggregating impacts on CI, while the urban-rural consumption structure is useful for reducing the inequality of carbon emissions. The above results in the robustness checks verify that our primary findings in the baseline regressions are reliable and accurate.

Table 4 Robustness tests using alternative control variables

4.4 Heterogeneous effect analysis

To investigate whether the impact of DED on CI is heterogeneous in various provinces in China with different levels of capital, we conduct a heterogeneous effect analysis. To be more specific, some provinces may have massive enterprises with a great demand for labor, and simultaneously the welfare of the labor force is better; in such a case, these provinces have a higher level of human capital. On the contrary, some provinces may have comparatively lower and insufficient human capital. The level of human capital is related to balanced urban-rural development and the inequality of carbon emissions. Government fiscal expenditure is also a crucial factor for coordinating development within a certain region. Government finance expenditure can help alleviate the imbalance of development among provinces and between urban and rural areas. Hence, we consider the heterogeneous effect in terms of human and social capitals.

In Table 5, the coefficient of DED is insignificant in higher human capital areas, but significant and negative in lower human capital areas. Moreover, situation of social capital is similar. The coefficient of DED is significant in column (4), but insignificant in column (3), indicating that developing DED is effective in reducing CI in areas endowed with lower social capital, but ineffective in mitigating CI in areas endowed with higher social capital. DED helps to promote the optimal allocation of resources, which makes a part of labor, capital, and technological elements diffuse from the urban to the rural areas [80, 103]. The provinces with lower capitals are usually located in the central and western regions, where the digitization level is not high, and the differences between the dual urban-rural structure are large. Therefore, in these regions, the role of digital economy in reducing CI is obvious. Conversely, provinces with high human capital and social capital have a strong digital economic foundation. DED breaks barriers and opens a digital channel for factor flow [11, 38]. However, developed areas tend to have high capital stocks and own a high level of production factors aggregation. Then the scale effect of capital and factor aggregation weakens the impact of DED on CI.

Table 5 Heterogeneous results by different capital characteristics of provinces

5 Further discussion

5.1 Moderating effect analysis

Considerable attention has been directed towards the digital economy as a pivotal tool for enhancing living standards, particularly for rural residents. Notably, Qian et al. [55] find that emerging financial services can effectively elevate the income and consumption levels of rural residents. Likewise, Tang et al. [60, 61] demonstrate that the development of e-commerce platforms driven by the digital economy significantly contributes to the improvement of residents’ living standards and income levels. Furthermore, the income level of rural residents serves as an indicator of the development status in rural areas. As the income level of rural residents increases, the disparities between rural and urban areas diminish significantly. This phenomenon correlates closely with the disparities in carbon emissions between rural and urban areas [43]. Consequently, the disposable income of rural residents becomes a crucial factor that influences the impact of DED on CI.

In this section, we further explore the role of rural residents’ disposable income (RRDI) in the relationship between DED and CI. We want to check whether the RRDI is a moderator in the DED-CI nexus or not, and whether the RRDI can strengthen the impact of DED on CI. To this end, we employ a moderating estimation model and list the following estimation equation.

$$\begin{gathered} \ln CI_{{{\text{it}}}} = \alpha_{0} + \alpha_{1} \ln CI_{i,t - 1} + \alpha_{2} \ln DED_{it} + \alpha_{3} \ln GDP_{it} \hfill \\ + \alpha_{4} \ln SER_{it} + \alpha_{5} \ln URP_{it} + \alpha_{6} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(5)
$$\begin{gathered} \ln CI_{{{\text{it}}}} = \rho_{0} + \rho_{1} \ln CI_{i,t - 1} + \rho_{2} \ln DED_{it} + \rho_{3} \ln RRDI_{it} + \rho_{4} \ln GDP_{it} \hfill \\ + \rho_{5} \ln SER_{it} + \rho_{6} \ln URP_{it} + \rho_{7} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(6)
$$\begin{gathered} \ln CI_{{{\text{it}}}} = \theta_{0} + \theta_{1} \ln CI_{i,t - 1} + \theta_{2} \ln DED_{it} \cdot RRDI_{it} + \theta_{3} \ln GDP_{it} \hfill \\ + \theta_{4} \ln SER_{it} + \theta_{5} \ln URP_{it} + \theta_{6} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(7)

The results of the three columns in Table 6 correspond to the above three equations. Notably, first, we only detect the impact of DED on CI; second, we add the variable of rural residents’ disposable income (denoted as \(lnRRDI\)); third, we generate the interaction term between DED and RRDI, and then evaluate the partial impact of this interaction term on CI.

Table 6 Results of the moderating role of rural resident disposable income in the DED-CI nexus

From the second column in Table 6 we can see that when adding RRDI, both the coefficient of DED and RRDI show negative impacts on CI, which means they play an effective role in accelerating the process of CI eradication. Specifically, for a 1% increase in RRDI, CI will be reduced significantly by 1.2168%. In addition, the coefficient \(lnDED*lnRRDI\) in column (3) is also significantly negative, which tells us that enhancing RRDI is conducive to boosting the CI inhibition effect from DED. Therefore, increasing the RRDI, on the one hand, is beneficial in decreasing CI; on the other hand, increasing disposable income can generate a synthetic effect and enlarge the role of DED in reducing CI. In a nutshell, the moderator, namely the disposable income of rural residents, is a facilitating factor in the DED-CI nexus.

The disposable income of rural residents is closely related to the living standards and production level of rural residents [57]. The disposable income of rural residents can, to some extent, reflect a situation in which the digital economy allocates capital for rural areas. The digital economy makes the distribution of resources more balanced, and simultaneously improves the rural network and other necessary infrastructure [18]. In this regard, the increase of rural capital stock helps strengthen the positive role of the digital economy in the allocation of factors. That is to say, the development of rural residents’ disposable income and DED facilitate each other, and their interaction has a positive synergistic effect on society and the environment. Thus, regardless of rural residents’ disposable income, DED, or their interaction, all exert a significant effect in reducing CI.

5.2 Mediating effect analysis

We have already found that a negative relationship exists between DED and CI; now we reveal how DED can negatively affect CI. In doing so, we use the mediating effect model to detect the possible internal impact mechanisms between the above two variables. Notably, as a new modern electronic platform, the digital economy has driven the development of the internet and the dissemination of information and knowledge; thus, the governance ability of governments and their regulation also become more transparent, which is verified by Shahbaz et al. [59] and Zhang et al. [82]. Specifically, Shahbaz et al. [59] find a mediating role of government governance in their study of the digital economy and energy transition. Zhang et al. [82] also find that environmental governance is a primary channel for the digital economy in promoting low-carbon development. Therefore, we take the government’s environmental regulation as a mediating variable. In addition, the development of the digital economy relies on scientific and technological research and development, which may contribute to the breakthrough of technological innovation. And Cao et al. [7] find that green technological innovation is used as a transmission path through which digital finance affects energy-environmental performance. Therefore, we choose technological innovation as another mediating variable. The specific mediation model estimation equations are as follows:

$$\begin{gathered} \ln ER_{{{\text{it}}}} = \partial_{0} + \partial_{1} \ln ER_{i,t - 1} + \partial_{2} \ln DED_{it} + \partial_{3} \ln GDP_{it} \hfill \\ + \partial_{4} \ln SER_{it} + \partial_{5} \ln URP_{it} + \partial_{6} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(8)
$$\begin{gathered} \ln CI_{{{\text{it}}}} = \delta_{0} + \delta_{1} \ln CI_{i,t - 1} + \delta_{2} \ln DED_{it} + \delta_{3} \ln ER_{it} + \delta_{4} \ln GDP_{it} \hfill \\ + \delta_{5} \ln SER_{it} + \delta_{6} \ln URP_{it} + \delta_{7} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(9)
$$\begin{gathered} \ln TI_{{{\text{it}}}} = \phi_{0} + \phi_{1} \ln TI_{i,t - 1} + \phi_{2} \ln DED_{it} + \phi_{3} \ln GDP_{it} \hfill \\ + \phi_{4} \ln SER_{it} + \phi_{5} \ln URP_{it} + \phi_{6} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(10)
$$\begin{gathered} \ln CI_{{{\text{it}}}} = \eta_{0} + \eta_{1} \ln CI_{i,t - 1} + \eta_{2} \ln DED_{it} + \eta_{3} \ln TI_{it} + \eta_{4} \ln GDP_{it} \hfill \\ + \eta_{5} \ln SER_{it} + \eta_{6} \ln URP_{it} + \eta_{7} \ln FDI_{it} + \pi_{i} + \mu_{t} + \varepsilon_{it} \hfill \\ \end{gathered}$$
(11)

where \(lnER\) and \(lnTI\) denote environmental regulation and technological innovation, respectively. The results in the first two columns of Table 7 are about environmental regulation (i.e., Eqs. (8) and (9)), while the last two columns in Table 7 are about energy technology (i.e., Eqs. (10) and (11)).

Table 7 The underlying impact channels in the relationship between DED and CI

Specifically, the impact of DED on environmental regulation is significantly positive: when DED increases by 1%, environmental regulation increases by 0.0100%, proving that developing the digital economy can significantly accelerate environmental regulation. Then the coefficient of environmental regulation in column (2) is -4.3869, illustrating that improving the level of environmental regulation by 1% can lead to a 4.3869% decrease in CI, which highlights the impact of DED on CI through environmental regulation. On the other hand, as for the internal impact mechanism of technological innovation, we can see from column (3) that the marginal impact of DED on technological innovation is 0.0846, which means an increase in DED of 1% is linked to an enhancement of technological innovation of 0.0846%. In the last column, if technological innovation is increased by 1%, CI can be efficiently reduced by 0.4176%. Thus, both environmental regulation and technological innovation are vital mediators, which highlights that DED can play an effective inhibitory role in CI by boosting the improvement of environmental regulation and technological innovation.

The reason for the mediating effect of environmental regulation may be that EDE has brought about a digital era and a digital society. Information technology characterized by digitalization, networking, and intelligence has provided more communication channels for economic and social development [63, 64, 82, 86]. Specifically, DED promotes the dissemination of information and news, reduces the deviation of government decision-making, and thus enhances the capacity and ability of governments’ governance [16, 59]. The development of the internet has also enhanced communication, understanding, and trust between the government and the people by reducing information asymmetry and information costs [53]. In this way, DED is essential for improving environmental regulation. Down the line, an increase in the intensity of environmental regulation can effectively curb the problem of an excessive urban-rural development gap, and simultaneously emphasize the importance of environmental governance, ecological protection, and economic development, which are paramount for coordinated development within provinces.

Regarding the second mechanism of impact through technological innovation, cutting-edge digital technologies have facilitated the rapid transmission of knowledge and technology [62, 65, 83]. Enterprises and scientific research institutions can achieve technological upgrading in a short period for clean energy research by leveraging advancements in digital infrastructure and the flow of knowledge and technology [20, 42]. The digital economy also reduces the technological innovation costs for clean energy-related enterprises and enhances the efficiency of their energy use. Furthermore, the presentation of technological innovation in the form of patents greatly expedites its diffusion and application. Thus, DED plays a vital role in allocating innovative elements by promoting technology innovation and patents [10]. Consequently, the progress of technological innovation drives the widespread adoption of renewable energy in both urban and rural areas, expedites the transformation of the energy structure, and facilitates access to renewable energy for rural residents in their daily lives [1, 35]. This, in turn, contributes to the eradication of CI between rural and urban areas.

Moreover, based on the findings of the moderating effect and mediating effect, we present Fig. 4 to show the relationship among DED, CI, and the moderating and mediating variables.

Fig. 4
figure 4

The relationship among DED, CI, moderator, and mediators

6 Conclusions

This study is among the first to evaluate the impact of DED on CI based on a provincial panel dataset in China for the period 2006–2019. We figure out the direct impact of DED on CI as well as its heterogeneous impact in terms of provinces with different levels of human and social capital. Then, in the moderating effect analysis, we pay attention to the role of disposable income in rural residential areas. Finally, we examine the two internal impact mechanisms in the DED-CI nexus. We thus get the following main results.

  1. (1)

    The baseline regression results reveal that restricted CI can be achieved by enhancing DED because DED plays a crucial role in inhibiting the inequality of carbon emissions in urban-rural gaps. And this primary finding is robust when using other control variables to re-conduct the estimation.

  2. (2)

    Heterogeneous effect analysis shows that in areas with a comparatively lower level of social and human capital, the CI mitigation effect brought by DED is more prominent and remarkable.

  3. (3)

    Moderating effect analysis highlights the role of rural residents’ disposable income: rural residents’ disposable income is negatively associated with CI. Furthermore, rural residents’ disposable income can significantly enlarge the negative impact of DED on CI, which means rural residential disposable income is a good moderator.

  4. (4)

    Mediating effect analysis presents that environmental regulation and technological innovation are the two mediating variables, which means that the indirect impact of DED on CI is through environmental regulation and technological innovation.

Corresponding policy implications are as follows. First, as the digital economy has a significant effect in promoting the reduction of CI, governments should pay close attention to DED. To be more specific, from the technology perspective, we should vigorously promote the breakthrough of key core technologies related to digitization, and achieve the transformation and upgrading of existing technologies. In particular, departments and enterprises related to energy exploitation, processing, and transformation should take advantage of DED to improve their productivity. To reduce CI, governments must pay attention to the differences and inclusion of digital infrastructure supply. For rural residents and low-income groups, financial resources should be invested to facilitate access to basic digital resources. Policymakers should also improve the participation of these groups in digitization and the application level of digitization.

Second, in provinces with different human capital and social capital, the relationship between DED and CI is different. In other words, DED plays a different role in CI in provinces with various capital endowments. And in provinces with lower human and social capital, the role of digitization is more obvious. Therefore, governments should increase the investment intensity of research and development (R&D) funds and provide more financial support for the development of digital equipment and technology. The governments should also increase human capital investment, especially in industries where digitization accounts for a relatively low proportion. This can be achieved by actively cultivating talents related to digitization. In addition, DED may have a substitution effect on low skilled labor. Therefore, the governments should increase investment in various education funds and pay attention to less skilled labor.

Third, to reduce CI between the urban and rural areas, we need to focus on environmental regulation and technological innovation. The governments first need to understand total carbon emissions as well as carbon emissions in the urban and rural areas, respectively. On this basis, the governments need to regulate energy consumption and environmental pollution in the urban and rural areas. The relevant authorities should pay more attention to energy transformation and industrial structure transformation in the urban areas. On the other hand, in the rural areas, consideration should be given to the coordinated development of economic growth, energy consumption, and carbon emissions. Technological innovation also plays a significant role in reducing CI. On the one hand, the governments can encourage R&D and the promotion of technological innovation through financial support and tax reduction. On the other hand, it is possible to establish a sharing mechanism and a diffusion mechanism of energy utilization technology within regions and provinces to achieve a rational division of labor and coordinated development among regions.