This study uses the two-stage dynamic undesirable data envelopment analysis model by considering global warming as an exogenous condition to assess the agricultural performance of European Union countries. The two stages are food production and consumption. The first stage explores the concept of food security for the food production efficiency of the relationship between fertilizer use and ammonia air pollution. In contrast, the second stage analyzes the idea of food loss and waste for the food consumption efficiency that issues of population growth and food waste. According to the empirical results, the efficiency of the general agricultural production stage is poor, and the efficiency of the food consumption stage is affected by general food waste. In over half of the countries, first-stage fertilizer utilization efficiency is less than 0.5, suggesting that fertilizers are overused in response to food production corresponding to European food demand. Moreover, if we do not consider the exogenous conditions of global warming and discuss the agricultural efficiency of European countries, then bias in the underestimation of efficiency appears.