Nitrogen fertilizers play a key role in crop production to meet global food demand. Inappropriate application of nitrogen fertilizer coupled with poor irrigation and other crop management practices threaten agriculture and environmental sustainability. Over application of nitrogen fertilizer increases nitrogen gas emission and nitrate leaching. A field experiment was conducted in China’s oasis irrigation area in 2018 and 2019 to determine which nitrogen rate, plant density, and irrigation level in sole maize (Zea mays L.) cropping system reduce ammonia emission and nitrate leaching. Three nitrogen rates of urea (46-0-0 of N-P2O5-K2O), at (N0 = 0 kg N ha−1, N1 = 270 kg N ha−1, and N2 = 360 kg N ha−1) were combined with three plant densities (D1 = 75,000 plants/ha−1, D2 = 97,500 plants/ha−1, and D3 = 120,000 plants/ha−1) with two irrigation levels (W1 = 5,250 m3/hm2 and W2 = 4,740 m3/hm2) using a randomized complete block design. The results showed that, both the main and interaction effects of nitrogen rate, plant density, and irrigation level reduced nitrate leaching (p < 0.05). In addition, irrigation level × nitrogen rate significantly (p < 0.05) reduced ammonia emission. Nitrate leaching and ammonia emission decreased with higher irrigation level and higher plant density. However, high nitrogen rates increased both nitrate leaching and ammonia emission. The study found lowest leaching (0.35 mg kg−1) occurring at the interaction of 270 kg N ha−1 × 120,000 plants/ha−1 × 4,740 m3/hm2, and higher plant density of 120,000 plants/ha−1 combined with 0 kg N ha−1 and irrigation level of 5,250 m3/hm2 recorded the lowest ammonia emission (0.001 kg N)−1. Overall, ammonia emission increased as days after planting increased while nitrate leaching decreased in deeper soil depths. These findings show that, though the contributory roles of days after planting, soil depth, amount of nitrogen fertilizer applied and year of cultivation cannot be undermined, it is possible to reduce nitrate leaching and ammonia emission through optimized nitrogen rate, plant density and regulated irrigation for agricultural and environmental sustainability.