This study investigates the impact of institutional quality on Foreign Direct Investment (FDI) inflows using panel data for low, lower-middle, upper-middle and high-income countries for the sample period of 1996-2016 using the system Generalized Method of Moments (GMM). The empirical results confirm that institutional quality has a positive impact on FDI in all group of countries. The magnitude of the coefficients of control of corruption, government effectiveness, political stability, regulatory quality, rule of law, and voice and accountability for FDI inflows are greater in developed countries than in developing countries. We conclude that institutional quality is a more important determinant of FDI in developed countries than in developed countries. However, GDP per capita, agriculture value-added as a percentage of GDP, and inflation influence FDI inflows negatively in developed countries, while GDP per capita, trade openness, agriculture value-added as a percentage of GDP, and infrastructure have positive and statistically significant impacts on FDI inflows in developing countries. Trade openness as a percentage of GDP and infrastructure positively affect FDI in developed countries. From our analysis, we infer that institutional quality is a more important determinant of FDI in developed countries than in developing countries.