The paper presents the results of a study that attempts to investigate the impact of foreign direct investment (FDI) on environmental performance (EP) by constructing a panel quantile regression model. Based on panel data from 1990 to 2014, this study contributes to evaluate the EP of each of the 40 countries using a directional slack-based model considering undesirable output. Our findings reveal several key conclusions: first, FDI has an insignificant influence on EP for the full sample. Second, the impact of FDI on EP between developed and developing countries exists heterogeneity. Furthermore, there is heterogeneity regarding the effect of FDI on EP at different quantiles of EP in developed countries. Specifically, in the developed countries, the effect is statistically insignificant at the lower quantile of EP, then it turns significantly positive at the middle and high quantile, and the positive effect rises with the increase of quantiles of EP. Finally, based on the conclusions of quantitative analysis, some important policy recommendations are proposed: different governments ought to enact different strategies for the introduction of FDI, according to different development situations of different countries.