Gray water footprint (GWF) is an effective method to evaluate the degree of water pollution and water quality. It is the amount of freshwater needed to dilute water pollutants to meet ambient water quality standards. Accounting and analyzing the GWF will be significant for promoting an improved water environment and sustainable water ecology in Ningxia Autonomous District. We accounted for the GWF of all cities in Ningxia from 2012 to 2020 and evaluated its spatial-temporal variations by the GWF accounting method proposed by Hoekstra. Then, the Logarithmic Mean Divisia Index (LMDI) method was applied to investigate the contributions of four driving factors: the population scale effect, economic development effect, technological effect, and industrial structure effect. And then, the changes in the GWF in the Ningxia region were analyzed. The results showed that the GWF in the Ningxia region changed from 79.21 × 108 to 29.09 × 108 m3/yr during 2012–2020, making a significant decreasing trend. Among all cities, Wuzhong City contributes the most in terms of the GWF. More specifically, economic development and technology structure are the positive and negative drivers of the GWF, respectively. The water pollution levels in Ningxia (0.49–1.3) indicated that the waste assimilation capacity has fallen short of taking up the pollutant load, which had an unfavorable impact on the groundwater according to actual water quality data. NO3-N and NH3-N are detected in the groundwater throughout the Ningxia region, with the highest NH3-N content in the groundwater in Yinchuan, which almost exceeded the groundwater quality standard of category III. Above all, this study reflected the current water pollution situation better by combining the GWF with actual water quality data in Ningxia. The finding of this study is valuable for addressing water quality threats and developing sustainable development.