The study of the patterns of plant species diversity and the factors influencing these patterns is the basis of ecology and is also fundamental to conservation biology. Groundwater-dependent vegetation (GDV) must have access to groundwater to maintain their growth and function, and this is especially common in arid and semi-arid regions, including north-western China. In this paper, plant species diversity and groundwater attributes (composition and depth) were investigated in 31 plots in the Ejina Delta in north-western China to determine whether groundwater attributes influenced patterns species diversity in GDV. Detrended canonical correspondence analyses and generalised additive models were performed to analyse the data. A total of 29 plant species were recorded in the 31 plots; perennial herbs with deep roots had an advantage over all other groups, and GDV species diversity was primarily affected by groundwater depth (GWD), salinity (SAL) and total dissolved solids (TDS), HCO3−, Ca2+, pH, and SO42−. The herb layer species diversity and total species diversity reached their maximum in similar, moderate environmental conditions. The diversity of the tree species was influenced by SAL and TDS and was maximal at large values of GWD and low values of SAL and TDS. The diversity of shrub species was affected by Ca2+ and Mg2+ and was maximal low GWD and high SAL and TDS. Patrick's and Shannon–Wiener's index of the total community diversity presented a bimodal pattern along gradients of GWD and SAL, whilst Simpson's and Pielou's index showed a partially unimodal pattern. On the basis of field investigation and the analysis of field data, we concluded that the perfect combination of GWD and SAL for GDV species diversity is 2 m and 1·8 g l−1, respectively. The appropriate combination range is 2–5 m and 1·8–4·2 g l−1, and the critical combination for the damaged GDV species diversity is 5 m and 4·2 g l−1. Copyright © 2012 John Wiley & Sons, Ltd.