The Loess Plateau is a major area for apple production in China, and improper irrigation and nitrogen fertilizer managements have affected the sustainable development of the apple industry in this region. Therefore, this study aims to (1) investigate the effects of irrigation and nitrogen levels on soil available nitrogen and apple yield in Loess Plateau; (2) explore the optimal combination of irrigation and nitrogen managements based on soil nitrogen and apple yield. For this purpose, a four-year irrigation and nitrogen management experiment was conducted from 2016 to 2019 in Loess Plateau. According to the water and nitrogen fertilizer requirement of apple tree, 4 irrigation levels (W1, no irrigation; W2, 60% ETc; W3, 80% ETc; W4, 100% ETc) and 4 nitrogen fertilizer levels (N1, 375 kg center dot ha(-1); N2, 490 kg center dot ha(-1); N3, 605 kg center dot ha(-1); N4, 720 kg center dot ha(-1)) were applied to the experiment. The results showed that irrigation and nitrogen levels had pronounced effects on soil available nitrogen distribution, content, uniformity coefficient (CU), apple yield, stable index (SI), sustainable yield index (SYI) and nitrogen surplus. With the increase in irrigation level, the soil available nitrogen accumulation area changed from the surface to the bottom, and the content and CU of soil available nitrogen first increased and then decreased. The greater nitrogen level was accompanied by surface aggregation of soil available nitrogen and nitrogen surplus. With the increase in nitrogen level, the CU and DUlq of soil available nitrogen significantly decreased, while DUhq decreased first and then increased. Moreover, the increasing irrigation and nitrogen level improved the apple yield, yield stability and sustainability. Based on the comprehensive evaluation and simulation analysis, the recommend irrigation and nitrogen level was 129-172 mm and 500-720 kg center dot ha(-1), respectively, with the intention of stabilize and sustaining apple yield and reducing environmental risk. However, there are still potential environmental problems in the recommended nitrogen level. Further improvements are needed, such as coating compound fertilizer and integration of water and fertilizer, to achieve the dual goals of soil sustainability and environmental security.