Sustainable development is now a global pursuit, encompassing economic, social, and environmental dimensions. Energy figures as a primary driver of the economy and thus for achieving a sustainable future. However, chronic lack of access to reliable, clean energy supplies presents as a barrier to development. This is especially true of developing countries. Foreign direct investment is pivotal in meeting the demand. While studies have shown that foreign direct investment in energy is significantly affected by political risk, the impacts of specific political risk factors across different country environments remain unrevealed. This study seeks to address this gap by identifying the impacts of specific political risk factors on foreign energy investment, and by investigating how these impacts are then moderated by further determinants. Panel data analysis is employed to explore the significant political risk factors impacting foreign energy investment in 74 developing countries, using data from 2008 to 2017. Analysis reveals that risk of investment profile, law and order, religious tensions and corruption result in significant political risk affecting foreign energy investment. However, these results are moderated across countries by further factors such as gross domestic product, economic freedom and energy demand within host countries. Clustering techniques reveal seven country groups sharing common moderating factors, significant to foreign energy investment. This insight reveals that lessons from one within-cluster nation will offer relevant lessons on energy investment across to others within the same cluster. Furthermore, based on the impact divergence in different country groups, practical suggestions government and foreign investors are also proposed.