This Article analyses the evolution of the public security defence to justify restrictions on free movement within the EU in the context of the energy sector. Taking the seminal 1984 Campus Oil case as the point of departure for its analysis, the Article focuses on the interplay between public security and energy security and shows two key changes in the case law of the Court of Justice of the European Union. First, it demonstrates how the scope of the public security defence in the energy sector has gradually narrowed. Second, it shows how the public security defence has developed to take into account evolving social, technological, and legal contexts in the EU energy sector. Culminating in cases like Hidroelectrica in 2020 and OPAL in 2021, analysis of the relevant case law suggests that, despite the societal dependence on energy and the ongoing geopolitical turmoil in Europe, the Court of Justice interprets exceptions from free movement in an increasingly strict manner, highlighting the primacy of internal market approaches to energy security.