The Russian-Ukrainian war brings many economic and social challenges. Among other, it causes turmoil in the global energy and food markets, affects the functioning of global food systems and threatens food security. Ukraine and Russia are important global exporters of cereals, oilseeds, fossil fuels, and mineral fertilizers. The war disrupts the flow of these goods to the world market, which has greatly increased their prices and in some countries caused food shortages. The purpose of this paper is to investigate the impact of the war on food chains in Slovenia. For this purpose, the self-sufficiency in cereals, the agri-food trade between Slovenia and the two countries at war, and the prices of some agricultural commodities and inputs were analysed. The results show that the import of agri-food products from Ukraine and Russia to Slovenia is not significant, but the negative effects of the war are felt nevertheless. These are shown mainly through the rising prices of production inputs, as well as uncertain political and economic developments, which affect stakeholders along the entire food chains. Due to various factors, the world prices of agricultural inputs and commodities were already at a very high level even before the Russian invasion, and additional pressure on prices was caused by the outbreak of war. The European Union, which is Slovenia’s main trading partner, covers domestic needs for most agricultural products through production, so there is no threat of food shortages. Nevertheless, food affordability remains a major concern due to high market prices and inflationary trends.