There are many viewpoints about the sources of groundwater in the Badain Jaran Desert (BJD), such as precipitation and snowmelt from the Qilian Mountains (the upper reaches [UR] of the Heihe River Basin [HRB]) and precipitation from the BJD and the Yabulai Mountains. To understand the source of the groundwater of the BJD and their possible associations with nearby bodies of water, we analyzed variations of stable isotope ratios (δD and δ18O) and the deuterium excess (d-excess) of groundwater and precipitation in the BJD, of groundwater, precipitation, river and spring water in the UR, and of groundwater and river water in the middle and lower reaches (MR and LR) of the HRB. In addition, the climatic condition under which the groundwater was formed in the BJD was also discussed. We found obvious differences in δD, δ18O, and d-excess among groundwater in the BJD, nearby water bodies and the HRB. The groundwater δD-δ18O equation for the BJD was δD = 4.509δ18O-30.620, with a slope and intercept similar to that of nearby areas (4.856 and −29.574), indicating a strong evaporation effect in the BJD and its surrounding areas. The equation's slope of the BJD was significantly lower than those of HRB groundwater (6.634), HRB river water (6.202), precipitation in the BJD and Youqi (7.841), and the UR of the HRB (7.839). The d-excess (−17.5‰) of the BJD was significantly lower than those of nearby groundwater (−7.4‰), HRB groundwater (12.1‰), precipitation in the BJD (5.7‰) and in the UR of the HRB (15.2‰), and HRB river water (14.4‰). The spatial patterns of δ18O and d-excess values in the BJD suggest mixing and exchange of groundwater between the BJD and neighboring regions, but no hydraulic relationship between the BJD groundwater and water from more distant regions except Outer Mongolia, which is north of the BJD. Moreover, we conclude that there is little precipitation recharge to groundwater because of the obvious d-excess difference between groundwater and local precipitation, low precipitation, and high evaporation rates. The abnormally negative d-excess values in groundwater of the BJD indicate that this water was formed in the past under higher relative humidity and lower temperatures than modern values.