ABSTRACT Under the pressures of global climate change and human activities, the carrying capacity of water and soil resources in agricultural lands has decreased, and the traditional models of agricultural development are no longer sustainable. Land degradation, groundwater quality reduction and ecosystem instability are the consequences of agricultural development without considering sustainability indicators. This article aims to investigate the use of variable relationship analysis and Bayesian network methods to analyze and investigate the relationship between irrigation in agriculture and the sustainability of the groundwater ecosystem. Descriptive statistics of agriculture including cultivation pattern, time, precipitation, irrigation, and land slope were analyzed and combined with the simulated characteristics of groundwater including specific yield, hydraulic conductivity and hydrodynamic diffusion coefficients. Five crops of wheat, barley, paddy, alfalfa, and potato were studied to evaluate the effect of plants on the pattern of nitrate release due to irrigation and fertilization in agriculture. The results showed that managing the amount of fertilizer and the volume of irrigation can positively affect the nitrate distribution pattern in the groundwater even in a short period of time.