This study investigates the effect of country-specific geopolitical risk on energy security and energy imports using heterogeneous panel data over the sample period 1980--2021. Employing the generalized method of moments panel vector autoregressive model, we find that heightened geopolitical risk significantly increases energy security risks and triggers an immediate decline in GDP growth, followed by a rapid recovery. Furthermore, our result shows that rising geopolitical risk leads to higher inflation and a long-lasting decrease in net energy import growth. The latter implies that countries relying heavily on energy imports may face long-term challenges and thus need to reassess their energy import strategies and consider alternative energy sources or investments in renewable energy to reduce dependence on imports. Overall, our findings suggest that countries may need to develop strategies that enhance energy security, such as diversifying energy sources, to mitigate the effects of geopolitical challenges.