Introduction

Since the reforms and opening up, China has achieved world-renowned economic achievements (Li et al., 2021). However, the traditional extensive development model, that is, to undertake industrial transfer from developed countries, has brought high environmental costs (Fang et al., 2021). In addition to the call for “green water and green mountains are golden mountains and silver mountains,” the most stringent “Environmental Protection Law of the People’s Republic of China” has also been revised and put forward by the Chinese government to realize the harmonious unity of economic development and ecological civilization. Most scholars have always regarded foreign direct investment (FDI) as one of the important reasons for the rapid growth of China’s economy and the rapid improvement of production technology (Blalock et al., 2008). However, with the excessive expansion of foreign direct investment in the scale of resource-based industries, the problem of environmental pollution has become more and more worrying (Ali et al., 2021; Hsu et al., 2021; Islam et al., 2021; Miao et al., 2019). From 2003 to 2018, China’s sulfur dioxide emissions decreased from 15,317.1 to 6896.7 kt, smoke and dust emissions increased from 10,490 to 7352.9 kt, and foreign direct investment soared from 53,505 to 134,966 million US dollars (see Fig. 1). Therefore, how to reasonably use environmental regulations to restrict the inflow of high-polluting foreign-funded enterprises and how to effectively attract the inflow of clean, capital-intensive, and technology-intensive foreign-funded enterprises have important practical and theoretical significance.

Fig. 1
figure 1

Trends of environmental pollution and foreign direct investment

At present, the research topics of environmental regulation and foreign direct investment are considered by scholars at home and abroad to have the following two viewpoints. On the one hand, in order to concentrate on the development of core industries in the country and keep the core industries in the leading position in the global industrial chain, the “pollution paradise” hypothesis holds that high-pollution, high-energy-consuming industries are transferred from countries with more developed economies and stricter environmental standards to countries with less developed economies and less stringent environmental standards. Later, as less developed countries’ economic strength and environmental protection standards continue to increase, industries with high pollution and high energy consumption will continue to shift to countries with weaker environmental regulations (Tanveer et al., 2021; Irfan et al., 2021b). On the other hand, the “pollution halo” hypothesis stipulates that foreign-funded enterprises with a higher level of production technology will have technology spillover effects on enterprises in the host country. Enterprises in the host country move towards an environment-friendly development model by improving production technology, adjusting the industrial structure, and improving resource allocation efficiency (Ahmad et al., 2021). At present, there is abundant literature on research topics of environmental regulation and foreign direct investment at home and abroad. However, based on the panel data of prefecture-level cities and from the perspective of industrial upgrading and resource allocation, there are relatively few documents discussing the impact of environmental regulations on foreign direct investment.

The possible marginal contributions of this paper are as follows. First, according to the panel data of 276 prefecture-level cities in China from 2003 to 2016, the impact of environmental regulations on foreign direct investment has been empirically analyzed through the spatial Durbin model. Second, the sample of prefecture-level cities is divided into eastern cities and non-eastern cities, ordinary cities, and key cities for heterogeneity analysis. Third, from industrial upgrading and resource allocation perspectives, the impact of environmental regulations on foreign direct investment has been empirically analyzed. The research framework is shown in Fig. 2.

Fig. 2
figure 2

Research framework

Fig. 3
figure 3

Mechanism analysis

The remainder of the article is organized as follows. “Mechanism and hypothesis” introduces the direct influence mechanism of environmental regulation on foreign direct investment and discusses the influence mechanism of environmental regulation on foreign direct investment from the perspective of industrial upgrading and resource allocation. In “Methods and data,” the estimation methodology and the data utilized in this study are briefly interpreted. “Results and discussion” provides the empirical results and discussion. In “Conclusions and policy recommendations,” the conclusions and related policy guidelines are proposed Fig. 3.

Mechanism and hypothesis

The mechanism of environmental regulation affecting foreign direct investment

Firstly, as China’s economic development level and environmental regulatory requirements continue to increase, Chinese provinces and cities will be gradually driven by environmental regulatory measures to restrict the inflow of high-polluting and high-energy-consuming foreign-funded enterprises (Irfan et al., 2021a; Wu et al., 2020a, b). To achieve the effect of “decontamination and cleaning,” China’s provinces and cities have changed their original development models and actively attracted foreign-funded enterprises such as clean, capital-intensive, and technology-intensive enterprises. The technology spillover effects of environmentally friendly foreign-funded enterprises have been effectively used by Chinese provinces and cities to accelerate the green innovation of local enterprises (Wu et al., 2021a; Cai et al., 2016). Secondly, foreign-funded enterprises are forced by China’s increasingly stringent environmental regulations to introduce advanced equipment and improve production technology; thereby, enabling domestic foreign-funded enterprises to improve their competitive position in the industry. However, in the long run, as the cost of innovation continues to increase, the inflow of foreign direct investment in economically developed regions will decrease. Finally, the environmental policy game caused by Chinese local governments to attract foreign direct investment is significant (Zhu et al., 2011). Therefore, according to the hypothesis of “competition to the bottom,” to gain a comparative advantage in fierce market competition, that is, to attract the inflow of foreign direct investment, local governments in China may compete to relax environmental regulations and lower environmental standards. However, from an overall point of view, local governments in China have made environmental regulations have a significant inhibitory effect on foreign direct investment to implement the comprehensive goal of environmental regulations. Based on the above analysis, the research hypothesis H1 is proposed as follows:

H1: Foreign direct investment is significantly inhibited by environmental regulations.

From the perspective of industrial upgrading, the mechanism of environmental regulation on the impact of foreign direct investment

First, from a short-term perspective, increasingly stringent environmental regulations will increase the marginal cost of enterprises and have a crowding-out effect on the R&D costs of enterprises, which is not conducive to the adjustment of enterprises’ structure, and thus cannot achieve industrial upgrading (Elavarasan et al., 2021). Moreover, with the high cost of pollution control, foreign-funded enterprises that have failed to achieve industrial upgrading will not maintain a leading position in their industry and can only move to countries or regions with relatively weak environmental regulations (Irfan et al., 2020). Second, from a long-term perspective, according to the “innovation compensation” effect (Porter et al., 1995), companies are forced by the pressure of environmental regulations and rising marginal costs to introduce advanced technology and equipment, carry out technological innovation, and adjust product structure. Companies digest high-pollution costs internally through the above methods, complete industrial upgrades, and maintain their leading position in the industry (Tong et al., 2016). Third, from the perspective of product demand (DIMELIS*, 2005) and commodity export structure (Kneller et al., 2007), the survival and development space of domestic enterprises with relatively backward production technology will be squeezed by foreign-funded enterprises with relatively advanced production technology. Domestic enterprises are forced to upgrade their production technology by foreign-funded enterprises with more advanced production technology, which has caused the domestic industry to transform from labor-intensive industries to capital-intensive and technology-intensive industries as a whole, which means that industrial upgrading has been completed (Wen et al., 2009). Fourth, from an overall point of view, under increasingly stringent environmental regulations, foreign-funded enterprises that have completed industrial upgrades are still profitable and will invest further. That is to say, from the perspective of industrial upgrading, environmental regulations significantly promote foreign direct investment. Based on the above analysis, the research hypothesis H2 is proposed as follows:

H2: From the perspective of industrial upgrading, foreign direct investment is significantly promoted by environmental regulations.

From the perspective of resource allocation, the mechanism of environmental regulation affecting foreign direct investment

First of all, based on the effect of “following costs,” under the circumstance that the technological level remains unchanged, companies will be forced to fully or partially estimate their increased environmental costs due to the growth of environmental regulatory pressures. The above situation has led to a sharp increase in the marginal cost of enterprises and a decrease in resource allocation and production efficiency (Tang et al., 2020). Moreover, due to the increase in pollution control costs, foreign-funded enterprises with slower resource allocation efficiency will no longer maintain their leading positions in the industry and can only move to countries or regions with weaker environmental regulations. On the contrary, companies will be motivated by reasonable environmental regulations to carry out technological innovation and other production activities. They will be prompted to optimize resource allocation to improve economic performance so that companies can internalize pollution control costs and maximize net profits (Borsatto et al., 2019). Secondly, from the perspective of the competitive effect of foreign direct investment, with the inflow of foreign-funded enterprises with higher production technology levels, domestic enterprises with relatively backward production technology levels are forced by industry competition pressure to improve production efficiency by optimizing resource allocation methods. As a result, the overall production efficiency of the industry has been maintained at a relatively high level. Moreover, from the perspective of the technology spillover effect of foreign direct investment, domestic companies can improve their own production efficiency by learning the production technology and management models of clean and technological foreign companies, thereby indirectly promoting the overall resource allocation efficiency and green innovation of the city (Zhang et al., 2020). Finally, from an overall point of view, under strict environmental regulations, foreign-funded enterprises still have substantial profits by optimizing the allocation of resources, driving further investment. That is to say, from the perspective of resource allocation, environmental regulations significantly promote foreign direct investment. Based on the above analysis, the research hypothesis H3 is proposed as follows:

H3: From the perspective of resource allocation, foreign direct investment is significantly promoted by environmental regulations.

Methods and data

Econometric methodology

Construction of the benchmark regression model

According to the hypothesis of “Pollution Heaven” and “Pollution Halo,” there is a U-shaped relationship between environmental regulation and foreign direct investment. In particular, foreign direct investment is decreased with the strengthening of environmental regulation. When environmental regulation develops to a certain stage, the foreign direct investment will reach the lowest value at the turning point. Then, with the enhancement and optimization of environmental regulation, clean and technology-intensive foreign-funded enterprises will continue to flow in. Therefore, this article establishes an econometric model based on the hypotheses of “Pollution Heaven” and “Pollution Halo” to study environmental regulation and foreign direct investment.

This paper introduces the performance-based environmental regulation index into the model, test whether there is a U-shaped relationship between environmental regulation and foreign direct investment. Furthermore, foreign direct investment is also affected by the rate of urbanization, society’s overall economic level, marketization level, the degree of openness to trade, and infrastructure construction. Therefore, add urbanization rate, per capita GDP, marketization level, trade openness, and infrastructure construction were used as control variables to the model to get the following basic econometric model:

$$ln{FDI}_{i,t}={\beta }_{0}+{\beta }_{1}ln{ER}_{i,t}+{\beta }_{2}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\alpha }_{i}+{\mu }_{i}+{\varepsilon }_{i,t}$$
(1)

In the formula, FDIi,t indicates the foreign direct investment of area i in t year; ERi,t indicates the environmental regulation of area i in t year; Xk,i,t indicates the control variable; αi and μi represent the fixed effect of region and year respectively; and εi,t indicates the random perturbed variable.

Spatial Dubin model

The design of the spatial Durbin model.

The spatial Durbin model (SDM) is a combined extended form of the spatial lag and error models. As the only model that can obtain unbiased coefficient estimates, it can take into account the spatial dependence of the dependent variables and the spatial correlation of the independent variables simultaneously (Yang et al., 2021). As China’s foreign direct investment and environmental regulation may have a spatial correlation, this paper proposes the SDM. The specific form is as follows:

$$ln{FDI}_{i,t}=\rho \sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{FDI}_{i,t}+{\beta }_{1}ln{ER}_{i,t}+{\beta }_{2}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\gamma }_{1}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{ER}_{i,t}+ {\gamma }_{2}\sum\nolimits_{i\ne j}^{N}{W}_{i,j,t}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\alpha }_{i}+{\mu }_{i}+{\varepsilon }_{i,t}$$
(2)

The design of the mediation model.

First of all, on the one hand, according to “innovation compensation,” strict environmental regulatory measures will force companies to carry out technological innovation and other production activities, prompting companies to complete industrial upgrading by adjusting product structure and other methods. On the other hand, from the perspective of product demand and commodity export structure, domestic enterprises’ survival and development space will be squeezed by foreign-funded enterprises with a higher level of production technology, forcing domestic companies to upgrade their industries. Therefore, to study the adjustment effect of industrial upgrading on environmental regulation, this article adds interactive items of industrial upgrading and environmental regulation to the model; the following model is obtained as follows:

$$ln{FDI}_{i,t}=\rho \sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{FDI}_{i,t}+{\beta }_{1}ln{ER}_{i,t}+{\beta }_{2}ln{IND}_{i,t}+{\beta }_{3}(ln{ER}_{i,t}\times ln{IND}_{i,t})+{ \beta }_{4}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\gamma }_{1}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{ER}_{i,t}+{\gamma }_{2}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{IND}_{i,t}+ {\gamma }_{3}\sum_{j\ne i}^{N}{W}_{i,j,t}(ln{ER}_{i,t}\times ln{IND}_{i,t})+ {\gamma }_{4}\sum\nolimits_{i\ne j}^{N}{W}_{i,j,t}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\alpha }_{i}+{\mu }_{i}+{\varepsilon }_{i,t}$$
(3)

Next, on the one hand, reasonable environmental regulation will encourage companies to internalize pollution control costs and maximize net profits by optimizing resource configuration. On the other hand, according to the technology spillover effect of foreign direct investment, domestic enterprises’ resource configuration is optimized by learning the production technology of clean and technological foreign-funded enterprises, ultimately realizing the improvement of the overall production efficiency of the society. Therefore, to study the adjustment effect of resource configuration on environmental regulation, in this paper, the interactive items of resource allocation and environmental regulation are added to the model, and the following model is obtained as follows:

$$ln{FDI}_{i,t}=\rho \sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{FDI}_{i,t}+{\beta }_{1}ln{ER}_{i,t}+{\beta }_{2}ln{TFP}_{i,t}+{\beta }_{3}(ln{ER}_{i,t}\times ln{TFP}_{i,t})+ {\beta }_{4}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\gamma }_{1}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{ER}_{i,t}+{\gamma }_{2}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}ln{TFP}_{i,t}+ {\gamma }_{3}\sum\nolimits_{j\ne i}^{N}{W}_{i,j,t}(ln{ER}_{i,t}\times ln{TFP}_{i,t})+ {\gamma }_{4}\sum\nolimits_{i\ne j}^{N}{W}_{i,j,t}\sum\nolimits_{k=1}^{5}ln{X}_{k,i,t}+{\alpha }_{i}+{\mu }_{i}+{\varepsilon }_{i,t}$$
(4)

In the formula, INDit indicates the industrial upgrading of area i in t year; TFPit indicates the resource allocation of area \(\mathrm{i}\) in \(\mathrm{t}\) year; ρ indicates the spatial autocorrelation coefficient; γ indicates the influence of other factors in the neighboring region on the foreign direct investment factors in the region; and Wi,j,t indicates a standardized spatial geographic distance matrix.

The construction of the spatial weight matrix.

Firstly, the spatial weight matrix is introduced to control the regional spatial geographic effect in the spatial econometric model. Therefore, a correct and reasonable spatial weight matrix should be able to accurately measure the spatial spillover effect. According to Tobler’s first law of geography, everything is related, but things nearby are more related than things far away (Tobler, 1970; Li et al., 2018). Especially for air pollutants, the spread of air pollutants across regions is obvious under the influence of atmospheric circulation. At present, spatial economists mainly use geographic distance matrix and economic weight matrix to analyze spatial effects. Based on the influence of spatial location factors on economic variables, this paper constructs a geographic distance matrix. Secondly, although with the continuous development of the economy and the deepening of exchanges between different countries and regions, environmental regulation between regions not only depends on the factors of spatial distance but also on factors such as the level of economic development between regions (Wang et al., 2019) but in practice, for the spatial spillover effect of pollutant emissions between regions, geographical distance is more important than economic distance (Chien et al., 2021; Mohsin et al., 2021). Finally, from an overall point of view, this article chooses the geographic distance matrix as the reference matrix, calculates as follows:

$${IND}_{i,t}= \left\{\begin{array}{c}d i\ne j \\ 0 i\ne j \end{array}\right.$$
(5)

In this formula, d indicates the distance between the centers of i and t in two regions or the distance between two points (provincial capital cities).

Data

Explained variable: foreign direct investment

In terms of foreign direct investment data, firstly, as China’s trade opening continues to deepen, foreign direct investment has become one of the important factors to promote China’s economic development; secondly, with the excessive expansion of foreign direct investment in the scale of resource-based industries, the problem of environmental pollution is becoming more and more worrying. According to the previous literature, this article adopts the actual use amount of foreign direct investment in each region and uses RMB’s annual average rate against USD to convert into RMB, which represents foreign direct investment (FDI). In addition, this paper uses the percentage of foreign direct investment in GDP by region to replace the actual use of foreign direct investment (Huang et al., 2021) for the stability test.

The core explanatory variable: environmental regulation

Until now, the methods of measuring environmental regulation are mainly divided into cost-based environmental regulation indicators and performance-based environmental regulation indicators. Next, because of the lack of official data on air quality emission fees and pollution investments, it may be inaccurate to use pollution charges and pollution investments to measure environmental regulation. Then, because the cost of pollution is closely related to the level of regional industrial development, the gross industrial output value is closely related to the government’s lowered threshold of the environmental pollution to attract the inflow of foreign-funded enterprises; therefore, the payment cost of pollution control is used as a measure of environmental regulation and may cause serious endogenous problems (Jaffe et al., 1997). The last, given the shortcomings of cost-based environmental regulation indicators, this paper adopts performance-based environmental regulation indicators by linear-weighted sum method and use the two individual indicators of SO2 removal rate and industrial smoke dust removal rate in each region to construct a comprehensive index of environmental regulation intensity (Wang et al., 2014; Wu et al., 2021b). Specific steps are as follows:

The first step standardizes the two indicators of SO2 removal rate and industrial smoke dust removal rate:

$${er}_{i,t,j}^{*}=\left({er}_{i,t,j}-\mathrm{min}\left({er}_{t,j}\right)\right)/\left(\mathrm{max}\left({er}_{t,j}\right)-\mathrm{min}\left({er}_{t,j}\right)\right)$$
(6)

In the formula, eri,t,j indicates the original value of the j type indicator of area i in j year; min(ert,j) indicates the minimum value of the j type indicator in all regions in t year; max(ert,j) indicates the maximum value of the j type indicator in all regions in t year; and er*i,t,j indicates the standardized value of the j type indicator in area i in t year.

The second step calculates the adjustment coefficients zi,t,j of the two individual indicators of SO2 removal rate and industrial smoke dust removal rate, respectively. Due to different proportions of the above two indicators in different regions and different levels of emissions in the same area, different weights are assigned to different indicators to ensure that it accurately reflects the degree of pollution control in each area. The specific calculation method is as follows:

$${z}_{i,t,j }= \frac{{er}_{i,t,j}}{{\sum_{i}er}_{i,t,j}} / \frac{{gdp}_{i,t}}{{\sum_{i}gdp}_{i,t}}$$
(7)

rate, to calculate the comprehensive index of environmental regulation is as follows: In the formula, zi,t,j indicates the adjustment coefficient of j type indicator in i area in t year; eri,t,j and gdpi,t respectively indicate the j type indicators and GDP of each region in t year. Third step, according to the standardized value er*i,t,j and adjustment coefficient zi,t,j of SO2 removal rate and industrial smoke dust removal

$${ER}_{i,t}= \sum\nolimits_{j=1}^{2}{z}_{i,t,j}{er}_{i,t,j}^{*}/2$$
(8)

Mediator

Industrial upgrading

Firstly, from a macro perspective, industrial upgrading is manifested as the transformation of the industrial structure from a low-level form to a high-level form. Secondly, from a micro perspective, industrial upgrading is manifested in the overall transformation of domestic industries from labor-intensive industries to capital-intensive and technology-intensive industries. Meanwhile, industrial upgrading is also manifested in transferring production factors from industrial sectors with lower production efficiency to industrial sectors with higher production efficiency (Pradhan et al., 2015). According to previous literature, use the shares of the thrice industries and their comparative relationships to measure industrial upgrading (Yuan et al., 2014). The specific calculation method is as follows:

$${IND}_{i,t}= {\sum\nolimits }_{m=1}({m}^{2}\times {ind}_{i,t,m})$$
(9)

In the formula, INDi,t indicates the industrial upgrading of area i in t year; m indicates the serial number of the thrice industries; indi,t,m respectively indicates the proportion of the primary industry, secondary industry, and tertiary industry in GDP.

Resource allocation

About resource configuration, this article uses the DEA-Malmquist index method to measure resource allocation. According to the previous literature, this article uses labor and capital as input factors, taking the gross regional product as an output factor. The specific input and output elements are processed as follows: output indicators, calculated using the gross regional product and converted the gross regional product level to 2003. For input indicators, labor input is expressed by the number of employees in each city over the years; capital input is measured by fixed capital stock. This data is not directly available and needs to be calculated, and this article uses the perpetual inventory method to calculate the stock of fixed capital (Zhou et al., 2020; Hao et al., 2020). The specific calculation method is as follows:

$${K}_{i,t}= {I}_{i,t}+\left(1-\delta \right)\times {K}_{i,t-1}$$
(10)

In the formula, Ki,t indicates the capital stock of area i in t year; Ii,t indicates the amount of fixed asset investment in area i in t year; δ is depreciation rate, assign a value of 6%. The initial year capital stock uses the depreciation of fixed assets of the year multiplied by 10%.

Control variables

Following existing literature (Yao et al., 2021), this article uses urbanization rate as the control variable, calculated as the ratio of urban population to total population at the end of the year; per capita GDP represents the overall economic level of a region; the ratio of fiscal expenditure to GDP represents the level of marketization; the ratio of total import and export to GDP represents the degree of trade openness; and per million square meters of road area represent infrastructure construction.

Data sources

First, due to the availability and reliability of the data, this paper finally selects the panel data of 276 prefecture-level cities in China from 2003 to 2016. Second, taking into account the lack of data in Tibet and other regions and the lack of data in Hong Kong, Macau, and Taiwan, this article uses 30 provinces other than Tibet, Hong Kong, Macau, and Taiwan for research. Third, the data used in this article all come from EPS and CEIC databases. Table 1 provides the names, descriptions, and descriptive statistics of the variables in this study.

Table 1 Descriptive statistics

Results and discussion

Spatial autocorrelation test

First of all, this study uses the Moran’s I index to judge whether foreign direct investment and environmental regulations between regions are spatially correlated. Specifically, when the index is greater than 0, it indicates that a certain economic variable in each region is spatially positively correlated; that is, there is spatial agglomeration. When the index is less than 0, it indicates that a certain economic variable in each region is negatively correlated in space; that is, there is spatial exclusion. When the index is equal to 0, it indicates that a certain economic variable is not related to the regional distribution. Secondly, according to Table 2, foreign direct investment and environmental regulations are significantly positive at the 1% level. It shows that foreign direct investment and environmental regulations in various regions have an obvious positive autocorrelation in space, that is, spatial agglomeration. Specifically, the Moran’s I index of foreign direct investment has shown a downward trend as a whole. This shows that the spatial correlation of foreign direct investment is gradually weakening; that is, the spatial distribution of foreign direct investment is becoming more and more balanced. The Moran’s I index of environmental regulations is showing an upward trend as a whole, which indicates that the spatial relevance of environmental regulations is gradually strengthening. With the continuous advancement of the construction of ecological civilization, the exchanges of environmental regulations between various regions have been continuously deepened, which has made the spatial relevance of environmental regulations continue to rise. Finally, the local Moran’s I scatter plot reflects the local spatial correlation characteristics of environmental regulations and foreign direct investment, and the specific results are shown in Figs. 4 and 5. In 2003 and 2016, whether it was environmental regulations or foreign direct investment, most prefecture-level cities fell into the first and third quadrants. This result indicates the rejection of the null hypothesis that “environmental regulations and foreign direct investment are randomly distributed in space,” indicating that both environmental regulations and foreign direct investment are spatially correlated, which is consistent with the global spatial correlation test results. Therefore, based on the above analysis, this study uses a spatial econometric model to conduct an empirical analysis of environmental regulations and foreign direct investment.

Table 2 Moran’s I index
Fig. 4
figure 4

Partial Moran I scatter plot of foreign direct investment

Fig. 5
figure 5

Partial Moran I scatter plot of environmental regulation

Baseline estimation

In order to select a suitable spatial measurement model, this study conducted a series of tests as follows, and the results are shown in Table 3. Firstly, the LM test is used to judge whether the model can be simplified into a spatial autoregressive model or a spatial error model. This result shows that the null hypothesis of no spatial error term and no spatial lag term is rejected at the 1% level. Secondly, LR and Wald tests are further used to show that the spatial Durbin model is more suitable than the spatial autoregressive model and the spatial error model. Thirdly, because prefecture-level city-level data is used for empirical analysis in this study, and each city has its own characteristics, the Hausman test is used to determine whether to choose a space and time double fixed-effects model for estimation. Finally, based on the above analysis, the spatial Durbin double fixed model is used in this study to conduct an empirical analysis of the relationship between environmental regulations and foreign direct investment.

Table 3 Benchmark estimation results

This study uses the OLS basic regression model, spatial autoregressive model, spatial error model, and spatial Durbin model to conduct empirical research on the relationship between foreign direct investment and environmental regulation. The specific results are shown in Table 3. This result shows that no matter which model is adopted, the coefficient of environmental regulation is significantly negative at the 1% level. That is, foreign direct investment is significantly inhibited by environmental regulations, and the research hypothesis H1 is initially verified. This may be the result of increasingly stringent environmental regulations in various regions. First, under the call of “green water and green mountains are golden mountains and silver mountains,” increasingly stringent environmental regulations have been proposed by the Chinese local government. This measure raised the marginal cost of “environmentally unfriendly” and other foreign-funded enterprises, which in turn made them withdraw from the market, and the inflow of high-polluting, high-energy-consuming foreign-funded enterprises has been consciously restricted or prohibited by the Chinese local government (Liu et al., 2021). Second, according to the “pollution halo” hypothesis, in order to achieve the effect of “decontamination and cleaning,” clean, capital-intensive, and technology-intensive foreign-funded enterprises are actively introduced by the Chinese government, and the technology spillover effects of foreign-funded enterprises such as “environmentally friendly” are effectively used to promote the spread of cleaner production technologies (Kim et al., 2019; Yu et al., 2020). However, as a whole, as the cost of innovation increases, foreign-funded enterprises will still move to countries or regions with weaker environmental regulations.

Decomposition effect

In order to judge whether the spatial spillover effect is significant, this study uses partial differentiation to decompose the spatial effects of the spatial Durbin model into direct and indirect effects. After that, the significance of the indirect effects of explanatory variables is used in this study to determine whether the spatial spillover effects are significant, and the total effects are numerically equal to the sum of the direct effects and the indirect effects. The specific results are shown in Table 4. First, from the perspective of core explanatory variables, the coefficient of environmental regulation is significantly negative at the 1% level. It shows that foreign direct investment is significantly inhibited by environmental regulations and further validates the research hypothesis H1. In addition, the indirect effects of environmental regulations are significantly negative at the 1% level. It shows that environmental regulations will reduce local foreign direct investment and have significant negative space spillover. This may be the result of environmental decentralization and competition between regional governments. Because local governments have a certain degree of autonomy in formulating regulations, this inevitably leads to different levels of environmental regulation in different regions (Jin et al., 2005; Zheng, 2007).

Table 4 Decomposition effect results

On the other hand, the significant negative spatial spillover of environmental regulations may be caused by the “top-to-top competition” of local governments for environmental governance from the perspective of environmental decentralization. In order to release the ability signal to the higher level government and increase its own promotion “weight,” compared with neighboring regions, the intensity of environmental governance has been further strengthened by the local government, resulting in greater restrictions on the inflow of high-polluting and high-energy-consuming foreign-funded enterprises. Secondly, in terms of control variables, on the one hand, the direct and indirect effects of per capita GDP are both significantly positive at the level of 1%. It shows that foreign direct investment is significantly promoted by per capita GDP, and per capita GDP has a significant positive space overflow. This may be because the higher the per capita GDP, the more developed the overall economic level of the society, and the more foreign companies are willing to invest in this area. On the other hand, the direct effect of trade openness is significantly positive at the 1% level, and the indirect effect is significantly negative at the 1% level. It shows that foreign direct investment is significantly promoted by trade openness, and trade openness has a significant negative space spillover. This may be because the higher the degree of local trade openness, the fewer restrictions on foreign companies entering the local area, leading to more foreign companies’ inflow.

Heterogeneous effects

In order to compare the differences in the impact of environmental regulations on foreign direct investment between different regions, according to the economic zone classification standard of the National Bureau of Statistics of China, the sample of prefecture-level cities is divided into eastern cities and non-eastern cities in this study. First, according to the results in Table 5, on the one hand, the estimated results of eastern cities are relatively close to the national estimates; that is, the coefficient of direct effect is significantly negative at the 1% level, and the coefficient of indirect effect is also significantly negative. It shows that foreign direct investment is significantly suppressed by foreign direct investment, and environmental regulations have a significant negative space overflow. On the other hand, the coefficient of indirect effects in non-eastern cities is not significant, indicating that the environmental regulations of non-eastern cities do not have spatial spillover effects. Secondly, it can be seen from the above analysis that the difference between the estimation results of eastern cities and non-eastern cities is more obvious. This may be the result of the overall economic difference between eastern cities and non-eastern cities. On the one hand, cleaner and more technological foreign-funded enterprises are attracted by eastern cities with more developed economies and complete infrastructure. Based on its rich economic resources, optimized resource allocation and technology spillover effects of foreign direct investment have been effectively used by local governments in eastern cities to take the road to high-quality and sustainable development. Moreover, because the more demanding ecological environment construction is proposed by residents of eastern cities with higher economic levels, the regional government has proposed more stringent environmental regulations than surrounding cities to further restrict the inflow of high-polluting foreign-funded enterprises. On the other hand, the technology spillover effect of foreign direct investment cannot be fully and effectively used by the local governments of non-eastern cities with relatively backward economic development and education to improve the economic and technological level of local cities. As a result, it is impossible to attract high-quality foreign-invested enterprises, resulting in a substantial reduction in foreign direct investment in non-eastern cities (Yang et al., 2019). Moreover, compared with surrounding cities, more stringent environmental governance measures cannot be proposed by local governments in non-eastern cities, resulting in environmental regulations that cannot generate spatial spillovers.

Table 5 Results of heterogeneous effects

In order to compare the differences in the impact of environmental regulations on foreign direct investment between different levels of cities, the sample of prefecture-level cities is divided into ordinary cities and key cities in this study. First of all, according to the results in Table 5, on the one hand, the estimated results of ordinary cities and the whole country are relatively consistent, and environmental regulations are significantly negative at the 1% level. It shows that foreign direct investment is significantly inhibited by environmental regulations. On the other hand, the direct effect of key cities is significantly negative at the 1% level and is significantly smaller than the direct effect coefficients of national and ordinary cities. At the same time, the spatial coefficient of key cities is not significant, and the indirect effect is only significantly negative at the 10% level, indicating that there is no spatial spillover of environmental regulations in key cities. Secondly, it can be seen from the above analysis that the difference between the estimation results of ordinary cities and key cities is more obvious. This may be due to the difference in administrative hierarchy between ordinary cities and key cities. Based on their own positioning and rich economic resources, key cities will look at the whole country, improve their sustainable development capabilities through technological innovation and industrial upgrading, and further restrict the inflow of high-polluting foreign-funded enterprises. On the other hand, the administrative barriers between key cities are relatively strong, presenting a situation of “fighting each other,” resulting in no spatial spillover effect of environmental regulations.

Mediation effect

In order to explore the impact of environmental regulations on foreign direct investment from the perspective of industrial upgrading, this study conducted the following research, and the specific results are shown in Table 6. First, the direct effect of the interaction term between environmental regulation and industrial upgrading is significantly positive at the 1% level, and the indirect effect is significantly negative at the 1% level. It shows that from the perspective of industrial upgrading, foreign direct investment is significantly promoted by environmental regulations; that is, the research hypothesis H2 is verified, and environmental regulations have significant negative spatial spillovers. Secondly, it can be seen from the above analysis that this may be the result of the “innovation compensation” effect of environmental regulations. On the one hand, based on the effect of “innovation compensation,” reasonable environmental regulations will appropriately increase the marginal cost of enterprises, forcing enterprises to increase their R&D capital through financing and other methods and improve the level of production technology (Wu et al., 2020a, b). In the end, while guiding the overall green development of society (Du et al., 2021), this initiative will transform from labor-intensive to capital-intensive and technology-intensive through the “survival of the fittest” approach, which is industrial upgrading. On the other hand, a higher level of product structure will bring a higher level of economic development. Based on its own higher level of economic development, the local government will adopt more stringent environmental governance measures than surrounding cities, resulting in further restrictions on the inflow of high-polluting foreign-funded enterprises so that local cities can take an environmentally friendly development path.

Table 6 Mediating effect results

In order to explore the impact of environmental regulations on foreign direct investment from the perspective of resource allocation, this study conducted the following research, and the specific results are shown in Table 6. Firstly, the direct effect of the interaction term between environmental regulation and resource allocation is significantly positive at the 1% level, and the indirect effect is significantly negative at the 1% level. It shows that from the perspective of resource allocation, foreign direct investment is significantly promoted by environmental regulations; that is, the research hypothesis H3 has been verified, and environmental regulations have a significant negative spatial spillover effect. Secondly, it can be seen from the above analysis that this may be the result of the “innovation compensation” effect of environmental regulations. On the one hand, in order to achieve the optimization of resource allocation and the maximization of economic performance, the efficiency of resource utilization and the degree of coupling and coordination between various economic resources can be improved by reasonable environmental regulations through technological innovation. On the other hand, foreign direct investment and the level of economic development are promoted by higher resource allocation efficiency. Based on its own higher level of economic development, the construction of an ecological civilization with higher requirements than surrounding cities was proposed by the local government, thereby further restricting the inflow of foreign-funded enterprises. In addition, it should be noted that the coefficient of resource allocation is significantly negative, indicating that foreign direct investment is significantly suppressed by resource allocation. This may be because the resource allocation is too low, that is, more than half of the samples with resource allocation less than 0.5. The low resource allocation efficiency is not conducive to the inflow of foreign-funded enterprises.

Robustness test

In order to verify whether the relationship between environmental regulations and foreign direct investment is sound, the following methods are used. The specific results are shown in Table 7. First, the calculation method of the explained variable was replaced by this study as the actual use of foreign direct investment as a percentage of GDP. Secondly, considering that the spatial weight matrix is the basis of the spatial measurement model, the spatial weight matrix is replaced by the spatial geographic adjacency matrix in this study. Third, the calculation method of the explained variable and the spatial weight matrix is replaced simultaneously. Finally, based on the above analysis, the robustness results are basically consistent with the above results, which provides evidence for the reliability of the above results.

Table 7 Robustness test results

Conclusions and policy recommendations

Based on panel data of 276 prefecture-level cities in China from 2003 to 2016, verified the relationship between environmental regulation and foreign direct investment by using SDM. The findings are as follows: Firstly, foreign direct investment is significantly inhibited by environmental regulation; the inflow of foreign-funded enterprises in neighboring regions are significantly inhibited by the improvement of local environmental regulation; that is, environmental regulation has a significantly negative spillover effect. Secondly, the environmental regulation of eastern cities has a significant inhibitory effect on foreign direct investment. At the same time, the environmental regulation of eastern cities has a significantly negative spillover effect. However, the direct effects of non-eastern cities significantly inhibit foreign direct investment, and the indirect effects are not significant. Thirdly, the environmental regulation of ordinary cities and key cities significantly inhibit foreign direct investment, and the environmental regulation of ordinary cities has a significant negative spatial spillover effect. The environmental regulation of key cities does not have spatial spillover. Finally, in the perspective of industrial upgrading, environmental regulation plays a significant role in promoting foreign direct investment. The inflow of foreign-funded enterprises is significantly inhibited by the improvement of local environmental regulation in neighboring regions; that is to say, environmental regulation has a significantly negative spatial spillover effect. In the perspective of resource configuration, environmental regulation also has a significant role in promoting foreign direct investment and has a significantly negative spatial spillover. At the same time, too low resource configuration efficiency will significantly inhibit foreign direct investment. However, this article does not deal with environmental regulations in a more detailed manner, and this type of issue will be the future research direction. Based on the above conclusions, the following policy recommendations are put forward:

Firstly, from a national perspective, environmental regulation has a significant inhibitory effect on foreign direct investment. On the one hand, reasonable environmental governance policies and moderate environmental regulation measures can produce the “innovation compensation” effect to achieve the effect of “decontamination and preservation” for foreign-funded enterprises. Domestic enterprises can use the technology spillover effect of foreign direct investment to upgrade production technology, introduce advanced equipment, attract clean, capital-intensive and technology-intensive foreign-funded enterprises, and take the road of high-quality and sustainable development. On the other hand, environmental regulation has a significantly negative spatial spillover effect. In the context of environmental decentralization, the “top-to-top competition” of local government environmental governance has been strengthened; that is, environmental decentralization has a positive role in promoting local environmental governance. Environmental governance measures strengthened by local government competition while significantly suppressing foreign direct investment are more likely to appear a “one-size-fits-all approach” phenomenon. Therefore, it is necessary to formulate perfect and reasonable environmental control measures and adopt different environmental control measures to deal with foreign-funded enterprises with different pollution levels and development levels, but also to further improve the local government competition mode under the context of environmental decentralization.

Next, on the one hand, there are obvious differences between eastern cities and non-eastern cities in China. First, foreign direct investment is significantly inhibited by the environmental regulation of the eastern city; the environmental regulation also has significantly negative spatial spillover. Therefore, the eastern cities with a relatively developed economy and comprehensive infrastructure should continue to strengthen environmental regulation and establish a long-term mechanism for environmental regulation to drive enterprise technological innovation through technological innovation and other methods to make up for economic losses that restrict high pollution-related foreign companies. Second, the non-eastern city environmental regulation has a significant inhibitory effect on foreign direct investment, but its indirect effect is not significant. Therefore, non-eastern cities with relatively backward economies should actively adopt higher education and talent attraction and other methods to improve cities’ overall technological innovation level to make full use of the technological spillover effect of foreign direct investment to develop the economy.

On the other hand, there are obvious differences in the spatial spillover effects of environmental regulation intensity between key cities and ordinary cities in China. The environmental regulation of ordinary cities has significant negative spatial spillovers, but the environmental regulation of key cities does not have spatial spillovers. Therefore, key cities should strengthen exchanges on the construction of ecological civilization, break down administrative barriers between cities, form the integration of environmental governance, and avoid a “fragmented” pattern of environmental governance; ultimately, it enables enterprises to carry out technological innovation, and avoid the “free ride” behavior of enterprises. At the same time, ordinary cities should find a balance between environmental protection and economic development, and avoid “one size fits all” behavior.

At last, on the one hand, in the perspective of industrial upgrading, environmental regulation significantly promotes foreign direct investment and has a significantly negative spatial spillover effect. Therefore, firstly, more direct foreign investment will be directed into the technological innovation sector, and the technological spillover effect of foreign direct investment shall be fully utilized to complete the industrial upgrading of enterprises. Secondly, it is possible to appropriately lower the environmental regulatory threshold for foreign-funded enterprises with lower pollution levels to better exert the promotion effect of foreign direct investment on industrial upgrading. Finally, eastern cities with relatively developed economies can make full use of foreign direct investment to upgrade their industries; however, non-eastern cities with relatively backward economies are more suitable to force enterprises to upgrade their industries through the “innovation compensation” effect of environmental regulation. On the other hand, in resource configuration, environmental regulation also significantly promotes foreign direct investment and has a significantly negative spatial spillover effect. Therefore, local governments should make full use of the “innovation compensation” effect of environmental regulation to force enterprises to upgrade production technology. Meanwhile, local governments can also strengthen subsidies for enterprise technology innovation and provide low-interest loans to enhance the enterprise’s resource allocation efficiency, thus attracting environmentally friendly, technical, and other foreign companies.