International trade has a significant impact on global environmental quality and sustainable economic development. Global value chains (GVCs) have become a crucial component of international trade and development policy. The global production structure has become more complicated with the inclusion of domestic markets in GVC, putting significant pressure on world energy resources and environmental sustainability. Therefore, traditional trade measures no longer accurately reflect how global trade affects the energy security of developing and developed countries. Thus, this study is the first to use a panel-corrected standard error method to look at the relationship between GVC participation and energy security by using a global sample of 35 developed and 27 developing nations from 1995 to 2018. A feasible generalized least squares model was also applied to confirm the robustness of the model. Six indicators-foreign direct investment, industrialization level, capital formation, human capital index, political stability, and GVC-were used in this research to look at their impact on the four fundamental pillars of energy security (availability, applicability, sustainability, and affordability) for sustainable economic development. For developed countries, it was confirmed that there is a non-linear relationship between GVC participation and energy intensity, renewable energy consumption, and non-fossil fuel use. In the case of developing countries, the non-linear relationship in terms of all aspects of energy security was also confirmed. The findings also indicated that GVC's involvement benefits all four dimensions of energy security in both developing and developed countries once it reaches a certain threshold. Our findings further support the impacts of long-term cointegration between GVC and energy security for sustainable economic development. Therefore, the nations must promote technology transfer and capacity building within GVCs for inclusive energy security. Similarly, they may foster sustainable practices through collaborative governance for a stable global energy network by acknowledging the positive impact of income levels on energy security.