This study contributes to the literature by investigating the effect of environmental degradation on foreign direct investment (FDI) using comprehensive panel data from 103 developing countries between 1970 and 2019. In this study, nine variables, namely, CO2 emissions, total greenhouse gas emissions, methane emissions, PM2.5, nitrous oxide emissions, ecological footprint of consumption, ecological footprint of production, total area (ecological footprint), and total biocapacity, were used to measure environmental degradation/sustainability. Using Lewbel's two-stage least squares to control endogeneity issues, the result from the aggregated sample indicates that while CO2 emissions significantly reduce FDI, the remaining environmental degradation variables stimulate FDI. Further analysis reveals that, generally, environmental degradation boosts FDI flows to low and lower-middle income countries while reducing FDI flows to upper-middle income countries. The regional analysis also shows that environmental degradation generally reduces FDI flows to Europe and Central Asia, and the Middle East and North Africa regions while stimulating FDI flows to South Asia, Sub-Saharan Africa, Latin America, and the Caribbean. Environmental degradation was found to have a neutral effect on FDI flows to East Asia and the Pacific. These results are robust to alternative econometric techniques. The policy implications are discussed.