Purpose Most emerging economies have made conscious efforts through policy initiatives to attract foreign direct investment (FDI). However, a significant obstacle to FDI inflow has been the prevalence of corruption in the host country. This study, therefore, aims to examine whether there is an optimum corruption value that results in threshold effects of corruption on FDI. Design/methodology/approach To achieve this objective, this study used Hansen’s (1999) panel threshold regression (PTR) model by using a panel data of 30 sub-Saharan African (SSA) countries from 2000 to 2021. Findings This study finds that the nexus between corruption and FDI has a single threshold effect, with a 5.37% optimum corruption threshold value. At this threshold value, corruption affects FDI negatively. Any corruption value that is below the threshold value also elicits a negative corruption–FDI relationship. Despite having a negative relationship when the corruption value is above the optimum corruption threshold, it is not statistically significant. Research limitations/implications The implication of the results is that it is deleterious to use corrupt practices to draw FDI to SSA nations. Originality/value To the best of the authors’ knowledge, this study is one of the first in the corruption–FDI nexus literature to use Hansen’s PTR model to estimate an optimal corruption threshold. The authors recommend that policymakers in the selected SSA countries reconsider the use of corruption to attract FDI because there is an optimal corruption threshold that could impact FDI in the host country.