Introduction

Since China’s entrance into the WTO, the process of globalization has intensified, leading to significant economic growth. This growth has been accompanied by rapid advancements in the digital economy, characterized by the widespread use of contemporary communication and information technologies such as big data, cloud computing, the Internet of Things (IOT), and artificial intelligence (AI). These technologies have revolutionized business models in “new retail” and “new manufacturing,” fueling the rapid development of the digital economy (Erokhin et al., 2022). However, this economic and technological progress has also resulted in substantial environmental challenges. The increase in industrial activities has led to the production of large amounts of toxic chemicals, exhaust gases, wastewater, and noise, posing serious threats to the environment and ecosystems. Environmental pollution has caused significant economic losses in China, estimated to account for approximately 8 to 15% of GDP (Jiang et al., 2016; Meng et al., 2016; Shi et al., 2016; Zeng et al., 2017; Zhao et al., 2018). The accumulation of human capital, the downsizing of output, the optimization of production structures, and the upgrading of production and abatement technologies contribute to the reduction of environmental pollution emissions (Levinson, 2009).

Environmental pollution and its governance are intricate and systematic efforts involving various participants, including the government, the market, and third-party organizations. These efforts incorporate management practices, green technologies, clean energy development and utilization, carbon peaking, carbon emission reduction, and carbon neutrality. Effective environmental governance supports high-quality development by ensuring sustainable economic growth, improving public health, and preserving ecological balance. It integrates different approaches and stakeholders to address environmental challenges comprehensively and holistically, ultimately contributing to the nation’s overall development goals (Constantin et al., 2021). Environmental pollution and its governance are intricate and systematic efforts involving various participants, including the government, the market, and third-party organizations. These efforts incorporate management practices, green technologies, clean energy development and utilization, carbon peaking, carbon emission reduction, and carbon neutrality (Constantin et al., 2021). Effective environmental governance supports high-quality development by ensuring sustainable economic growth, improving public health, and preserving ecological balance. It integrates different approaches and stakeholders to address environmental challenges comprehensively and holistically, ultimately contributing to the nation’s overall development goals. It also incorporates many topics such as environmental pollution governance systems and institutions (Lan et al., 2012). Grossman and Krueger (1991) paved the way for further investigation of environmental pollution. They proposed an inverted U-shaped association between a country’s economic level and environmental pollution. Specifically, while a country’s economic level is low, environmental pollution is comparatively light; but as per capita income rises, so does environmental pollution. However, as the economy reaches a particular level, i.e., after the inflection point, the output of environmental pollutants decreases, eventually leading to an improvement in environmental conditions. This viewpoint is critical in the study of environmental pollution and contributes to our knowledge of the interaction between the economy and the environment (Andreoni & Levinson, 2001; Khalil & Inam, 2006; Park et al., 2015).

The integrated and organic growth of the economy, society, and environment is essential to green transformation and healthy economic growth. This holistic development ensures that economic advancements do not come at the expense of social well-being and environmental sustainability. The swift growth of contemporary communication and information technologies, including big data, cloud computing, the Internet of Things (IoT), and artificial intelligence (AI), has accelerated this process. Their widespread application in “new retail” and “new manufacturing” business models has fueled the rapid development of the digital economy. These technologies help optimize resource use, reduce emissions, and promote sustainable practices, thereby supporting the integrated growth of the economy, society, and environment. While this research is focused on China, the findings have broader implications for other countries undergoing similar economic transformations. Understanding the interplay between digital economy, FDI, and environmental sustainability is crucial for policymakers worldwide, especially in developing countries that seek to balance economic growth with environmental protection. The insights gained from this study can help inform global strategies to promote sustainable development in the context of rapid technological advancement and international investment. The influence of digital economy growth on the environment is most visible in attempts to establish green production models in businesses, optimize government environmental regulation modes, and improve social environmental supervision mechanisms. First, the corporate green production model acts as a vital link. In the context of the digital economy, businesses can use technologies like virtual reality, databases, and the Internet of Things to integrate information resources into manufacturing making choices, address fragmented and asymmetric information issues, optimize production processes, increase productivity, reduce resource waste, and promote green development (Jing & Sun, 2019; Zhao et al., 2023; Guan et al., 2023; Zhang & Ran, 2023). Secondly, the optimization of government regulatory modes plays a vital role. With China’s expanding economic scale and increasingly complex ecological environment issues, traditional environmental regulations face challenges of inadequate supply, outdated methods, and low efficiency. The digital economy offers opportunities and technological support for government environmental regulation for starters, big data, cloud computing, and technologies for remote sensing may be used to accomplish real-time monitoring and pollution warning, improving regulatory accuracy and governance level (Hampton et al., 2013; Shin & Choi, 2015). Thirdly, efficient collection, integration, and sharing of environmental monitoring data enable dynamic evaluation of work performance and provide data support for environmental policies and decision-making. Finally, the improvement of social environmental supervision mechanisms is a crucial aspect. The expansion of digital economy allows for the communication and sharing of information among the government and society, opening up new avenues for the public to have access to vital ecological environment knowledge and raise awareness of environment (Liang et al., 2021). The public can systematically grasp environmental changes, gain an in-depth understanding of regulations and governance achievements, and promote environmental protection actions. Additionally, innovative methods like online supervision and interactive data distribution enhance government-public interactions, facilitating supervision implementation, reflecting pollution behaviors, and promoting collaborative environmental governance (Yang et al., 2005).

Grossman and Krueger (1991) conducted studies on the association between pollution of environment and per capita income, which sparked interest in the relationship between foreign direct investment (FDI) and pollution of environment. Their research postulated a “U-shaped” link between environmental pollution levels and economic growth: pollution is comparatively light at lower levels of economic development, and pollution increases as economic development increases but increases as per capita income rises. However, when economic development reaches a turning point, environmental conditions gradually improve and pollution emissions decrease. Subsequently, Sikandar et al. (2021, 2022) and Raza et al. (2023a) conducted theoretical and empirical research on environmental effects of FDI, but the results were inconclusive. The research can be categorized into two perspectives. First is the “pollution haven hypothesis” based on environmental regulation intensity, which suggests that foreign investment tends to flow into regions with lax environmental regulations, leading to pollution transfer. Scholars supporting this view found that FDI in regions such as Pakistan, India, and South Korea promoted local industrialization and accelerated economic development, but also imposed significant pressures on the ecological environment (Khalil & Inam, 2006; Andreoni & Levinson, 2001; Raza et al., 2023b). In contrast, during China’s introduction of FDI, the loose environmental regulatory standards attracted considerable investment into pollution-intensive industries, negatively impacting the ecological environment. Moreover, this influence exhibited regional heterogeneity, decreasing progressively from east to west, exacerbating China’s challenges in surpassing the Environmental Kuznets Curve (EKC) (Xia, 1999; Yang et al., 2005; Wen et al., 2008; Chen, 2008; Sha & Shi, 2006). The second is the “pollution halo hypothesis,” which posits that there exists a significant technological gap between the source countries of FDI and host countries. This gap allows the host country to learn advanced production, management, and technology from foreign enterprises, which helps improve management levels and subsequently enhance environmental quality. Some scholars argue that after FDI entered China, the “demonstration effect” and “spillover effect” could reduce pollution emissions. However, the prevalence of this circumstance is determined by a number of factors, including city size, the region’s economic growth level, and total FDI in the local region. Nonetheless, other academics argue that the impact of FDI on environmental pollution is complicated owing to the complex interaction of various variables. For example, the “pollution haven effect” is only found in coastal and inland areas, not border regions, and the involvement of FDI in environmental concerns has a higher threshold (Zhang & Fu, 2008). Furthermore, the different sources and industrial heterogeneity of FDI have varying effects on environmental pollution. FDI in the tertiary industry can improve environmental pollution, while the introduction of heterogeneity factors has significantly improved the ecological environment through FDI from Southeast Asian countries and European and American countries. However, the entry of offshore financial centers’ enterprises into China has caused certain levels of pollution (Wang et al., 2019).

Most research, in general, utilizes panel regression analysis to evaluate the association between possible influencing factors and environmental pollution, frequently missing the influence of geographical correlation (Erokhin et al., 2021; Raza et al., 2023a, 2023b). Traditional panel models often assume that each unit is independent, which means that one region’s emissions and influencing variables are unrelated to another. This assumption, however, certainly does not correspond to reality. On the one hand, air or water currents may cause pollution in one place to effect pollution in another, and vice versa, establishing interdependence. The agglomeration effects of industry, on the other hand, and externalities from governmental policy promote spatial correlation in environmental pollution. As a result, ignoring spatial correlation might result in biased estimate findings (Poon et al., 2006). Furthermore, Rothman (1998) revealed that the Environmental Kuznets Curve is useless for some pollutant emissions. As a result, several studies have started to use numerous environmental pollutant indicators to indicate the total amount of pollution (He, 2006; Ma et al., 2010). Currently, there have been studies exploring the mechanisms of the impact of digital economy on environmental pollution. However, most of the analyses are based on qualitative research, lacking quantitative studies on the relative importance of various influencing factors and the interactions among them. Furthermore, prior research has seldom explored the spatial connection among the environmental pollution-impacting elements, ignoring the relevance of spatial factors. Furthermore, while some studies have looked at how digital economy and FDI relate to pollution control, most of them only look at one or two factors, failing to reveal spatial spillover effects and spatial heterogeneity between digital economy, FDI, and pollution. Here are also few studies based on specific regions in China.

This paper seeks to address the aforementioned research gaps by examining the spatial relationship and regional variations between digital economy, FDI, and environmental pollution. The analysis is based on data from eleven provinces and cities spanning the years 2010 to 2020. The specific research questions include the following:

  1. 1.

    What are the mechanisms by which the digital economy and FDI affect environmental pollution?

  2. 2.

    Due to regional heterogeneity, what is the difference in the impact of the digital economy and FDI on environmental pollution?

This paper’s marginal contributions are as follows:

  1. 1.

    The study employs the entropy weighting method to establish a comprehensive environmental pollution index for assessing variations in environmental quality among different provinces.

  2. 2.

    The authors present a wealth of scientific research on the influence of the digital economy and FDI on pollution.

  3. 3.

    In terms of methodology, this research uses the geographical Durbin Model (SDM) in conjunction with mediation effects and threshold models to investigate the direct and geographical spillover impacts of digital economy and FDI on the pollution of the environment. As a result, this article explores both the direct and geographical spillover impacts of the digital economy and FDI on environmental pollution, avoiding the coefficient bias induced by ignoring spatial effects.

  4. 4.

    According to the geographical separation matrix, this work includes economic considerations by constructing a geographic and economic nested matrix suited for the Yangtze River Economic Belt.

In conclusion, despite much research on the relationship between digital economy, FDI, and environmental pollution, the following flaws remain:

  1. 1.

    Previous research has solely looked at the influence of digital economy on environmental degradation. Rarely is the full impact of technical advancement on environmental pollution examined.

  2. 2.

    Existing research seldom controls the geographical impacts, nonlinear properties, and endogeneity issues of variables in a single model, resulting in biased regression findings.

  3. 3.

    Existing research on the variability of digital economy, FDI, and environmental pollution needs additional development.

  4. 4.

    The spatial effects of core pairs of quantities have not been studied in sufficient depth.

The remainder of this paper is organized as follows: the “Methods and Data” section discusses three different models, variable selection, sample selection and data description, spatial autocorrelation Test, model selection. The “Spatial Durbin Model Results Analysis” section presents Spatial Durbin Model results analysis, mediation analysis, threshold effect analysis, heterogeneity analysis, robustness checks. The “Conclusion and Policy Recommendation” section presents conclusion and Policy Recommendation.

Methods and Data

Model Specification

Spatial Durbin Model

When discussing regional economic issues in geography, we often ignore the spatial relationship between variables, which affects the accuracy of regression analysis. The first law of geography states that the connection between objects that are close in geographic location is greater than those that are far away (Tobler, 1979). Getis (1995) used a spatial autoregressive model (SAR) to analyze and study the pricing of industrial products in-depth. Anselin (1990) further developed two new models: Spatial Error Model (SEM) and Spatial Durbin Model (SDM), which can effectively deal with spatial errors. Based on the Spatial Durbin Model, Chen et al. (2017) proposed the Dynamic Spatial Panel Data Model (DPDM) and systematically studied the estimation methods of the parameters in DPDM. Taking into account the specific characteristics of the panel data of the Yangtze River Economic Belt, the basic model for examining the relationship between technological innovation, fair employment for women, and environmental pollution levels can be formulated as follows (Eq. 1):

$${EP}_{it}={\alpha }_{0}+{\alpha }_{1}{DE}_{it}+{\alpha }_{2}{FDI}_{it}+{\alpha }_{4}Contro{l}_{it}+{\varepsilon }_{it}$$
(1)

As policy guidance has a significant impact on regional development in each province and city, and policy implementation may lag in time and space, it is necessary to introduce the time-lagged dependent variable EPit-1 and spatial-lagged variable WEPit.

$${EP}_{it}=\tau {EP}_{it-1}+\rho {W}_{ij}{EP}_{it}+{\alpha }_{0}+{\alpha }_{1}{DE}_{it}+{\alpha }_{2}{FDI}_{it}+{\alpha }_{3}DE\_FDI+{\alpha }_{4}Contro{l}_{it}+{\alpha }_{5}{W}_{ij}*{DE}_{it}+{\alpha }_{6}{W}_{ij}*{FDI}_{it}+{\alpha }_{7}{W}_{ij}*DE\_FDI+{\alpha }_{8}{W}_{ij}*Contro{l}_{it}+{\varepsilon }_{it}$$
(2)

In Eq. 2, EPit represents the dependent variable, \(DE\) it and \(FDI\) it represent the core explanatory variables, it represents the year of the ith city in the panel data, the coefficient ρ measures the degree and direction of the spillover effect of ecological environment quality, and the coefficient τ represents the cumulative effect of ecological environment quality in the time dimension. The weight matrix is \({W}_{ij}\), and \({W}_{ij}\) EPit represents the spatial lag term of the dependent variable. Control represents the control variables, and the random error term is denoted by ε.

Mediation Effect Model

At the heart of the digital economy are large-scale data processing, cloud computing, and network connectivity, activities that require a large supply of electricity. Infrastructure such as data centers, servers, and communications equipment need to be in constant operation, which leads to huge power demands. Associated with high energy consumption are carbon emissions, especially carbon dioxide (CO2) emissions. Electricity production is usually one of the main sources of carbon emissions. Therefore, the high energy demand of the digital economy and the carbon emissions associated with it are one of the most important causes of its environmental pollution. In order to mitigate this impact, FDI companies in the digital economy need to take measures, such as the use of renewable energy sources, energy efficiency, and the implementation of carbon emission reduction strategies, in order to minimize their negative impact on the environment. The above theoretical analysis describes the whole “digital economy-FDI-environmental pollution” chain. In light of this, this study employs the mediating effect model to conduct empirical tests to determine whether there is a mediating effect of FDI in the process of digital economy’s impact on environmental pollution, whether digital economy can have a significant impact on environmental pollution via the mediating variable of FDI.

The graph below depicts the three-variable mediation effect model. M is considered a mediating variable if the independent variable X may impact the dependent variable Y in some way by altering the variable M. If the coefficients a, b, and c in the model are all significant, it indicates that there is a mediating effect, and the proportion of the mediating effect in the total impact is ab/c. Furthermore, if c′ is significant, it indicates an incomplete (or partial) mediating impact; if c′ is not significant, it indicates a full mediating effect. In addition, the signs a and b with c′ must be considered. The same sign suggests a partially mediated impact, and the mediated effect’s proportion of the overall effect is ab/c′, but a different sign indicates a masking effect. The presence of a masking effect shows that the mediating impact’s direction is opposite the direct effect’s direction. When the positive and negative signs of the mediating impact are opposite to those of the direct effect, one positive and one negative cancel each other out, and the computed overall effect becomes smaller or even negligible.

As seen above, digital economy X influences the degree of pollution of the environment Y via the mediating impact of gender equality in the workplace M. Building upon the stepwise approach, this paper makes improvements by incorporating the research findings of Baron and Kenny (1986) and Wen et al. (2004), and the model is formulated as follows:

$${EP}_{it}={\alpha }_{0}+c{DE}_{it}+{\alpha }_{2}col+{\varepsilon }_{it}$$
(3)
$${FDI}_{it}={\beta }_{0}+a{DE}_{it}+{\beta }_{2}col+{\varepsilon }_{it}$$
(4)
$${EP}_{it}={\gamma }_{0}+c{^\prime}{DE}_{it}+b{FDI}_{it}+{\gamma }_{3}col+{\varepsilon }_{it}$$
(5)

FDIit means the amount of foreign direct investment in province and city i in year t, DEit denotes the degree of digital economy in province and city i in year t, EPit signifies the amount of environmental pollution in province and city i in year t, a, b, c, and d' are the coefficients of the variables to be evaluated, and Col is the stochastic disturbance factor. Level of economic, urbanization rate, and financial autonomy are the control variables.

The Threshold Effect Model

This research develops a non-linear model to investigate the possible non-linear relationship and threshold impact among the digital economy, FDI, and the amount of environmental pollution. The threshold value is established using Hansen’s (1999) threshold model, and changes in parameter values in each threshold interval may be detected to minimize subjective estimation bias. The following is the exact model:

$$EP={\lambda }_{0}+{\lambda }_{1}DE\times I\left({q}_{it}\le {\mu }_{1}\right)+{\lambda }_{1}FDI\times I\left({q}_{it}\succ {\mu }_{1}\right)+\alpha Col+{\varepsilon }_{it}$$
(6)
$$EP={\lambda }_{0}+{\lambda }_{1}FDI\times I\left({q}_{it}\le {\mu }_{1}\right)+{\lambda }_{1}FDI\times I\left({q}_{it}\succ {\mu }_{1}\right)+\alpha Col+{\varepsilon }_{it}$$
(7)

At the same time, it is necessary to consider the occurrence of multiple thresholds, and the above model can be appropriately extended as follows:

$$EP={\lambda }_{0}+{\lambda }_{1}DE\times I\left({q}_{it}\le {\mu }_{1}\right)+{\lambda }_{2}DE\times I\left({\mu }_{1}\prec {q}_{it}\le {\mu }_{2}\right)+{\lambda }_{3}DE\times I\left({q}_{it}\succ {\mu }_{2}\right)+\alpha Col+{\varepsilon }_{it}$$
(8)
$$EP={\lambda }_{0}+{\lambda }_{1}FDI\times I\left({q}_{it}\le {\mu }_{1}\right)+{\lambda }_{2}FDI\times I\left({\mu }_{1}\prec {q}_{it}\le {\mu }_{2}\right)+{\lambda }_{3}FDI\times I\left({q}_{it}\succ {\mu }_{2}\right)+\alpha Col+{\varepsilon }_{it}$$
(9)

In this case, if the value inside the parentheses of the objective function is positive, it is set to 1; otherwise, it is set to 0. The threshold variable is denoted as qit, representing the digital economy (DE) and foreign direct investment (FDI) in this study. The corresponding threshold values are denoted as μ (where μ1 < μ2). Col represents the control variables, and ε is the random error term.

Spatial Weight Matrix

Based on previous literature, we constructed a geographic distance matrix and a nested matrix of geographic and economic distances (hereinafter referred to as the nested matrix). To construct the geographic distance matrix, we employed the inverse of the squared transportation length dij among provincial capital cities, as given in Eq. 10 (where i and j represent provincial capital cities). The nested matrix combines economic heterogeneity factors and is derived from the geographic distance matrix, as shown in Eq. 11.

(10)
$${W}_{q}={W}_{d}diag(\frac{\overline{{x}_{i}}}{\overline{x}},\frac{\overline{{x}_{2}}}{\overline{x}},...,\frac{\overline{{x}_{n}}}{\overline{x}})$$
(11)

\(diag(\frac{\overline{{x}_{i}}}{\overline{x}},\frac{\overline{{x}_{2}}}{\overline{x}},...,\frac{\overline{{x}_{n}}}{\overline{x}})\) is the diagonal matrix, where \(\overline{{x}_{i}}={\sum }_{{t}_{0}}^{{t}_{1}}\frac{{X}_{it}}{({t}_{1}-{t}_{0}+1)}\) is the mean of the economic variable x for spatial section i in the time period t0 to t1, and variable \(\overline{x}={\sum }_{1}^{n}{\sum }_{{t}_{0}}^{{t}_{1}}\frac{{x}_{it}}{n({t}_{1}-{t}_{0}+1)}\) is the mean of x (Wang, 2013).

Variable Selection

For environmental pollution level (EP), referring to Liu and Lin’s (2019) research on the system of environmental pollution level, this paper constructed a comprehensive index system of environmental pollution level through the entropy method; the meanings and weights of various indicators are detailed in Table 1.

Table 1 Comprehensive indicator system for environmental pollution (Level 1 parameter)

In order to determine the composite score, the entropy approach is utilized to objectively assign weights to different signs in the assessment index system of pollution of the environment level. Equation 12 is the calculation formula:

$${EP}_{ij}={{\sum }_{i=1}^{n} \times W}_{j}{E}_{ij}$$
(12)

where Eij represents the proportion of standardized indicator, j in province and i in the indicator system; Wj represents the weight corresponding to the indicator; and a higher value of EPij indicates a higher level of environmental pollution.

Explanatory factors include the digital economy (DE) and foreign direct investment (FDI). This article creates a complete development index for digital economy indicators using the entropy technique (Zhang et al., 2021), as shown in Table 2. In terms of FDI measurement, this study used the proportion of actual FDI to GDP to determine the volume of foreign direct investment (Qamri et al., 2022).

Table 2 Digital economy comprehensive development index (Level 1 parameter)

Variables under control

The proportion of urban permanent inhabitants to the entire population is used to calculate the urbanization rate, and the proportion of revenue to spend within the fiscal budget is used to calculate fiscal autonomy. Economic development is assessed by per capita regional GDP (gross domestic product) (Liang et al., 2019).

Sample Selection and Data Description

The authors used panel data from eleven provinces in the Yangtze River Economic Belt from 2010 to 2020. The information used for all variables is mostly from the China Statistical Yearbook, China Regional Economic Statistical Yearbook, China Energy Statistical Yearbook, and the China Digital Inclusive Finance Index published by Peking University’s Digital Inclusive Finance Center. The authors used interpolation approaches to handle missing data. Table 3 displays the statistical findings.

Table 3 Descriptive statistics of variables

Spatial Autocorrelation Test

To construct a spatial econometric model, it is necessary to examine whether there is spatial autocorrelation among the study objects. The global Moran’s index is commonly used to test the presence of spatial correlation, and this method has been widely adopted in the literature. The formula for Moran’s index is given in Eq. 13:

$$I=\frac{{\sum }_{i=1}^{n}{\sum }_{j=1}^{n}W({Y}_{i}-\overline{Y})({Y}_{j}-\overline{Y})}{{S}^{2}{\sum }_{i=1}^{n}{\sum }_{j=1}^{n}W}$$
(13)

where W represents the weight matrix and n is the sample size. Moran’s index values range from − 1 to 1. When I is larger than zero, it suggests that the variable has a high-high spatial clustering association. When I is smaller than zero, it denotes a low-low spatial clustering connection. Stata 15.0 software was utilized in this study to quantitatively investigate the geographical link between the pollution level (EP), digital economy (DE), and FDI from 2010 to 2020. The global Moran’s index was used to examine the correlation between variables (Table 4).

Table 4 Environmental pollution, digital economy, and FDI in the Yangtze River Economic Belt, 2010–2020

Table 4 indicates that the Moran’s score for environmental pollution levels across the Yangtze River Economic Belt exhibits positive spatial dependency and a steadily declining trend from 2010 to 2020. On the one hand, this suggests a positive relationship between the degree of pollution in the Yangtze River Economic Belt and its geographic distribution, with a high-high spatial clustering pattern. On the reverse side, it implies that disparities in pollution levels across nearby provinces after 2010 are related to their disparate growth strategies. The Moran’s index of foreign direct investment exhibits an early growing trend followed by stability, demonstrating an upward correlation between the degree of FDI into the Yangtze River Economic Belt and its geographic distribution, with a high-high spatial clustering pattern. It also indicates a favorable trend in surrounding provinces’ foreign investment. Although these three variables show geographical connection, more investigation using spatial econometric models is necessary to study their interrelationships and assess the influence of the digital economy and FDI on the degree of environmental pollution.

Model Selection

Several models commonly used for spatial panel data analysis include the SEM model, SAR model, and SDM model. Multiple tests are conducted to determine the appropriate model. In this study, LM test, Hausman test, and LR test are performed (Table 5). Based on the nested matrix, the SDM model is selected as the optimal model, utilizing fixed effects and spatial fixed effects with time. Additionally, the choice of weight matrix significantly impacts the results, but the consistent findings between the geographic matrix and nested matrix tests demonstrate robustness.

Table 5 Static panel data model correlation test results

Spatial Durbin Model Results Analysis

Empirical Results

Table 6 shows the SDM model estimate outcomes for Eqs. (1) and (2) using Stata 15.0. Model 1 reflects the SDM model, but Model 2 incorporates the digital economy and FDI interaction term into the SDM model. The findings show that, in the nested matrix, Model 2 has a greater value of σ2 and R2 than Model 1. This implies that Model 2’s results are more accurate; hence, the study focuses mostly on Model 2’s outcomes.

Table 6 Estimation results of dynamic Spatial Durbin Model

Environment pollution in the Yangtze River Economic Belt is reported to have spatial spillover effects, with varied relevance across different weight matrices in the spatial dimension. The weight matrix that incorporates economic factors shows significant results in pollution, indicating that the rapid economic development contributes to pollution in neighboring provinces.

Effect Decomposition

The core theoretical basis for the digital economy to suppress environmental pollution is that it promotes resource efficiency improvement, carbon emission reduction, and environmental protection technology innovation. The widespread application of digital technology enables businesses and governments to better monitor and manage resource consumption, reduce waste, and thereby cut environmental pollution. In addition, the digital economy promotes the development of clean energy and renewable energy technologies, reduces the use of high-carbon energy, and helps reduce carbon emissions. The application of this technology also provides real-time environmental monitoring and control means, allowing environmental problems to be detected and responded to more quickly, thereby reducing potential environmental pollution risks. The core theory of FDI in curbing environmental pollution is that it introduces modern technology and management experience, which helps improve production efficiency and resource utilization efficiency, thereby reducing environmental burdens. Foreign companies often introduce cleaner, more resource-efficient production methods to target countries, reducing waste emissions and resource waste. In addition, FDI usually brings higher environmental standards, prompting target countries to adopt stricter environmental regulations and regulatory measures. This inflow of foreign capital has also created job opportunities and economic growth, improved people’s living standards, made them more willing to support environmental protection measures, and formed a strong foundation for sustainable development. The theoretical basis for the synergy of digital economy and FDI to suppress environmental pollution lies in their mutually reinforcing effects. The digital economy introduces efficient resource management and monitoring tools, optimizes resource utilization through digital technology, and reduces waste and energy waste. FDI has improved production efficiency, reduced carbon emissions, and prompted the country to formulate more stringent environmental regulations by introducing capital, modern technology, and management practices. Digital technology provides environmental data monitoring and analysis for FDI, allowing it to take environmental protection measures more effectively. The two work synergistically, and the technology and data of the digital economy support the sustainable development of FDI, thereby jointly reducing the risk of environmental pollution and achieving an organic combination of environmental protection and economic growth. This study applies the partial differentiation approach to explore the impacts of digital economy and FDI on pollution levels in order to solve the issue of unidentified “feedback effects” in geographic economic models. Table 7 displays the specific outcomes.

Table 7 Results of the estimation of spatial spillover effects

Direct Effect Analysis

Table 6 shows the results of SDM model estimation of Eq. (1) using Stata 15.0. The short-term impact coefficient of the digital economy on environmental pollution is 0.3106, which is significantly positive at the 5% level; the long-term impact coefficient is − 0.6695, which is significantly negative at the 10% level. This result is in line with the law of the Environmental Kuznets Curve (EKC). When the digital economy develops for a period of time and passes the “inflection point,” environmental pollution tends to decline steadily from high to low (Bruyn 1997; Maddison, 2006; Zhong, 2022). This theory has been confirmed by numerous studies in countries around the world (Shuai et al., 2019).

The short-term impact coefficient of FDI on environmental pollution is − 7.3943, significant at the 5% level; the long-term impact coefficient is − 8.3515, significant at the 10% level. This result is consistent with the results obtained by many scholars, who believe that foreign direct investment exhibits an inverted “U”-shaped curvilinear relationship on environmental pollution (Kamal et al., 2016; Demena & Afesorgbor, 2020; Le et al., 2022). FDI may lead to There will be a certain amount of environmental pollution because the company needs to upgrade equipment and technological transformation. However, over time, technological advancement and the implementation of environmental regulations, FDI can contribute to the reduction of environmental pollution. Therefore, in both the short and long term, foreign direct investment can inhibit environmental pollution and achieve a win–win situation for economic development and environmental protection.

The short-term impact coefficient of the interaction term of digital economy and FDI on environmental pollution is − 0.0587, which is significant at the 10% level. The long-term impact coefficient is − 0.1116, but it is not significant. Their combination has not been found in existing studies, and there are no samples for a comprehensive comparison. The research results of this article show that, on the one hand, in the short term, FDI may introduce advanced digital technologies and management methods and improve production efficiency and resource utilization efficiency, thereby reducing environmental pollution. However, in the long term, other countries and businesses will also have the opportunity to learn and adapt to these technologies, gradually reaching similar levels, thus weakening the unique impact of the digital economy and FDI. On the other hand, economic development may lead to changes in industrial structure over time. Some highly polluting and energy-intensive industries may gradually decrease, while cleaner and more environmentally friendly industries may increase. Such structural adjustments could reduce overall levels of environmental pollution, of which the digital economy and FDI may be just some of the factors.

Indirect Effect Analysis

The short-term effect of the digital economy on environmental pollution is − 0.3673, which is highly significant at ten percent. The long-term effect of − 0.7097, on the other hand, is negligible. This shows that while the growth of the local digital economy has a short-term suppressive impact on environmental degradation in nearby provinces, the effect is not substantial in the long run. To begin with, the growth of the local digital economy has the potential to cut pollution emissions in surrounding provinces through technology transfer and increased environmental regulations. However, the rise of the digital economy and the industrial chain may result in environmental spillover effects over time. The digital economy’s demand for resources and energy may drive surrounding provinces to participate in more resource extraction and energy consumption to suit their development demands, raising the danger of environmental damage. In the long run, the growth of the local digital economy may create competitive pressures, causing adjacent provinces to increase their efforts in digital economic development in order to preserve a competitive edge. Because of this competitive pressure, safeguards for the environment may be sacrificed during the course of digital economic growth, diminishing the inhibitory impact of the local digital economy on pollution of the environment.

The short-term coefficient of FDI on pollution is − 3.9732, which is substantial at ten percent. The long-term effect is 0.478, although it is not statistically noteworthy. This suggests that while FDI in the local region has a short-term suppressive impact on pollution of the environment in nearby provinces, the effect is not substantial in the long run. In the near term, environmental protection rules may put pressure on FDI, leading to initiatives to minimize pollution. However, this pressure may reduce with time, as will the inhibitory impact of FDI on the environment. Long-term environmental pollution reduction may be achieved by adjacent provinces through independent digital economy and advancement. This implies that they no longer rely on FDI’s environmental management and emission reduction technologies, but instead enhance their surroundings through their own efforts, gradually weakening the detrimental impact of FDI on environmental pollution. Simultaneously, adjacent provinces may progressively accomplish resource allocation and industrial structure optimization, minimizing excessive resource exploitation and pollutant emissions. This structural adjustment decreases reliance on FDI, resulting in a reduced inhibitory influence on pollution.

Total Environmental Pollution Impact of Foreign Direct Investment

The short-term coefficient of the overall effect of FDI on environmental pollution is − 11.3675, which is substantial at the one percent level. The long-term correlation is − 7.8735, which is significant at one percent. This finding corresponds with the findings of some scholars who argue that FDI reduces emissions and indirectly suppresses environmental degradation in China, resulting in the phenomenon of “pollution halo” in certain regions (Birdsall & Wheeler, 1993; Benzerrouk et al., 2021; Nejati & Taleghani, 2022; Nguyen-Thanh et al., 2022). Although the indicators utilized by these researchers for environmental degradation and FDI differ from those used in this study, the underlying properties of the variables are comparable, resulting in somewhat different outcomes.

Mediation Analysis

Stationarity Test

Time series data may lead to nonstationarity, and to avoid the problem of “spurious regression,” unit root tests such as LLC, IPS, Fisher-ADF, and Fisher-PP are conducted on the variables. Table 8 shows that all the original series variables pass the stationarity test after first-order differencing (due to space limitations, the results of the control variable tests are not presented).

Table 8 Smoothness test results for the mediation effect

Mediation Effect Test

Table 9 shows the results of analyzing models (6), (7), and (8) using the updated estimate approach. The digital economy factor in Model (6) is 0.5885, which is significant at the five percent level. The digital economy factor in Model (8) is 0.4121, which is substantial at the five percent level. FDI has a coefficient of − 4.9606, which is substantial at the one percent level. The digital economy factor in Model (7) is − 0.0356, which is substantial at the one percent level. These findings are comparable with earlier Spatial Durbin Model testing findings, and the mediator effect testing findings reveal that the coefficients a, b, c, and c′ are − 0.0356, − 4.9606, 0.5885, and 0.4121, each of which have importance at different tiers. Furthermore, the sign of ab is the same as the sign of c′, showing that FDI helps to mitigate the impact of the digital economy on environmental degradation.

Table 9 Results of the mediation effect test

Further Analysis: Threshold Effect Analysis

The empirical results obtained in the previous section show that female employment has a partial mediating effect on the relationship between technological innovation and environmental pollution. However, it is unclear whether there exists a threshold condition for the partial mediating effect of female employment. In this section, we conduct further research to examine this issue by using the threshold variables of technological innovation and female employment to test single and double threshold models. Table 9 reports the F-values and P-values obtained from 300 bootstrap samples for single and double threshold models.

Previous empirical findings indicate that FDI has a partly mediation influence on the effect of the digital economy on pollution. This study investigates if there is a threshold requirement for the partly mediating impact of FDI. The digital economy and FDI are used as threshold variables in single and dual threshold value tests, and Table 10 shows the F-values and P-values derived from 300 bootstrap samples.

Table 10 Threshold effect test results

The model with FDI as the threshold variable belongs to a single threshold model, according to the results in Table 10. This suggests that an upper limit exists in the influence of the digital economy on environmental damage. The threshold value, according to Hansen (1999), is the value at which the LR statistic tends to zero. A LR plot with a 95% confidence interval for the threshold value may be generated as a result of this. Figure 1 depicts the LR plot with a threshold value of 0.0272 for digital economy.

Fig. 1
figure 1

Source: authors’ development

FDI threshold estimation LR chart.

The estimation results of the single threshold model using foreign direct investment as the threshold variable are shown in Table 11. When FDI is low (0.0272), the impact of the digital economy on environmental pollution is significant at the five percent threshold of significance, showing that a small amount of the digital economy causes pollution. However, when FDI is substantial (more than 0.0272), the digital economy has a certain inhibiting influence on pollution. This conclusion verifies a previous discovery that the digital economy has a strong short-term direct influence on environmental degradation, but that this effect fades with time.

Table 11 Threshold effect test results

Heterogeneity Analysis

The Yangtze River Economic Belt’s 11 provinces are separated into upstream, midstream, and downstream areas to examine regional variability in the digital economy, FDI, and environmental pollution. Table 12 shows the results of the SDM model analysis utilizing both the geographical matrix and the nested matrix as weights.

Table 12 Results of the regional heterogeneity test

Under the layered matrix, the estimation findings in Table 12 show considerable negative spatial ripples of environmental pollution among adjacent provinces in the midstream area. Environmental pollution control actions in midstream provinces such as Hubei, Hunan, and Jiangxi have yielded preliminary results, and the quality of the ecological environment has progressively improved. The reduction in environmental pollution in these provinces has prevented pollution in neighboring provinces. According to the nested matrix, the estimated coefficient of the digital economy in the Yangtze River Economic Belt’s midstream area is considerably positive. This means that for every 1% growth in the midstream region’s digital economy, the degree of environmental pollution rises by 239.126%. It shows that the digital economy is growing faster in the middle region than in the upstream and downstream sectors. The Internet and data centers consume a lot of energy, and the environmental carrying capacity is limited. As a result, pollution control measures must be increased. According to the nested matrix, the predicted coefficients of FDI in the Yangtze River Economic Belt’s midstream and downstream areas are both notably negative. Every 1% increase in FDI in the midstream and downstream regions reduces environmental pollution by 1012.3% and 8.5462%, respectively. This suggests that FDI in the midstream and downstream regions of China is concentrated in traditional industries with higher levels of environmental pollution. In particular, FDI in the midstream region, which is an economically developed area, has shifted towards environmentally friendly and technological industries. The significant increase in environmental awareness and education level has also strengthened the efforts to control environmental pollution.

Robustness Checks

Endogeneity Test

Endogeneity difficulties may occur as a result of the possible causal relationship between the digital economy and environmental damage. To solve this issue, this analysis employs Wooldridge’s (2002) technique, which employs lagged first-order and lagged second-order FDI as instrumental variables. A 2SLS regression analysis is performed, as indicated in Table 13. The first-stage F-test is significant at the level of one percent, showing that the lagged FDI variables chosen are not only not weak, but also strong. Furthermore, the coefficients of the lagged first-order and lagged second-order variables are highly linked with the coefficient of FDI, indicating that the criteria of instrumental variable relevance are met. The second-stage coefficient of FDI is significant at the 5% level, with only a change in magnitude compared to the dynamic Spatial Durbin Model, indicating the robustness of the previous test results and the absence of endogeneity.

Table 13 Endogeneity test results

Variable Substitution

In order to verify the robustness of the results of the mediation effect test, the method of Opoku et al. (2021) was used, with the first-order lagged environmental pollution index substituted for the environmental pollution index. Table 14 demonstrates that the coefficients as well as the importance of the mediation impacts (a, b, c, c′) remain unchanged, confirming the robustness of the mediation effects model results.

Table 14 Results of robustness tests for the mediation effect

Conclusion and Policy Recommendation

This study examined the spatial relationship and regional variations between the digital economy, FDI, and environmental pollution in eleven provinces and cities along China’s Yangtze River Economic Belt from 2010 to 2020. The findings provide several important contributions to the existing literature.

Firstly, we found that the digital economy significantly reduces environmental pollution by promoting green technologies and improving resource efficiency. This result is consistent with previous studies that have highlighted the positive environmental impacts of technological advancements (Jing & Sun, 2019; Zhao et al., 2023). However, our study further reveals the spatial heterogeneity of this impact, emphasizing the need for region-specific policies.

Secondly, our analysis showed that FDI has a dual effect on environmental pollution. While FDI can transfer advanced technologies and management practices that reduce pollution (the pollution halo hypothesis), it can also lead to the relocation of polluting industries to regions with lax environmental regulations (the pollution haven hypothesis). This finding aligns with previous research by Khalil and Inam (2006) and Andreoni and Levinson (2001), but our study adds to the literature by providing a detailed spatial analysis that underscores the regional disparities in these effects.

Thirdly, the study’s use of the Spatial Durbin Model (SDM) and mediation effects models to explore the direct and spillover impacts of the digital economy and FDI on environmental pollution highlights the complexity of these relationships. While prior studies (Erokhin et al., 2021; Raza et al., 2023a) have utilized panel regression models, our approach addresses the potential biases caused by ignoring spatial correlations and provides a more nuanced understanding of the spatial dynamics involved.

To effectively address these findings and promote sustainable development, we propose several policy recommendations:

Establish an Environmental Monitoring Network: The government should invest in building a widespread environmental monitoring network for real-time tracking of key environmental indicators such as air and water quality. Monitoring data should be made publicly available to enhance transparency. This recommendation is aligned with similar suggestions from previous studies emphasizing the importance of transparency and real-time data in environmental governance (Hampton et al., 2013).

Green Standards for the Digital Economy: The government should formulate green standards for the digital economy to regulate the environmental practices of digital economy enterprises. These standards should include reducing energy consumption, minimizing waste emissions, and adopting clean technologies. Previous research supports the need for regulatory frameworks to guide sustainable practices in the digital economy (Jing & Sun, 2019).

Strengthen Environmental Approval Processes: The government should enhance the environmental approval procedures for foreign direct investment projects to ensure compliance with local environmental regulations and standards. The approval process should be made more rigorous to prevent environmental degradation due to lax regulations, a concern highlighted in prior studies (Khalil & Inam, 2006).

Fines and Sanctions: Violating FDI entities should be subject to fines and sanctions, including project suspension or termination. This will help ensure that foreign investment’s negative impact on the environment is kept under control. This aligns with the findings from previous research emphasizing the need for stringent enforcement mechanisms (Andreoni & Levinson, 2001).

Encourage Cross-Border Collaboration Projects: The government should encourage digital economy enterprises to collaborate with foreign direct investors on joint projects to develop and promote environmental technologies. Collaboration projects can encompass waste management, clean energy, and resource management. This is supported by literature that highlights the benefits of international collaboration in environmental technology development (Zhang & Fu, 2008).

Exchange of Environmental Technology: The government should facilitate the exchange of environmental technologies between digital economy enterprises and foreign direct investors, encouraging the sharing of best practices and experiences. This will help improve environmental standards and is consistent with prior findings on the positive spillover effects of technology transfer (Wang et al., 2019).

Innovation in the Green Digital Economy: The government should promote the adoption of clean production technologies by digital economy enterprises in the middle reaches. This should include renewable energy and resource recycling. The government can provide incentives for green innovation to encourage sustainable development. Previous studies have emphasized the role of innovation in achieving environmental sustainability (Guan et al., 2023).

Attract FDI: The government should actively attract foreign direct investment, especially in economically developed areas in the middle reaches. This can be achieved through investment incentives and streamlined approval processes to promote ecological protection and environmental improvement. This aligns with research that suggests targeted FDI can enhance environmental quality if properly managed (Raza et al., 2023b).

In conclusion, this paper contributes to the literature by offering a comprehensive analysis of the spatial and regional effects of the digital economy and FDI on environmental pollution. Unlike previous research that has often overlooked spatial factors, our study provides a detailed examination of how these relationships vary across different regions. This highlights the importance of considering spatial heterogeneity in policy-making to effectively address environmental challenges. Future research should continue to explore these dynamics in other regions and contexts to further validate and expand upon our findings.