The Ejin River , also known as the Heihe River , is a major river system that originates on the northern Gansu side of the Qilian Shan mountains. A total of 800 km long, the river has two major branches: the western branch flows from Zhangye through and Jiuquan, while the eastern branch flows through Ganzhou. The two branches merge near Gaotai and flow north into the Inner Mongolia Autonomous Region, where the river terminates in the Ejin Basin in the Gobi Desert.
The former Tangut capital of Khara-Khoto, now deserted, lies near the lower end of the river. According to legend, the city was abandoned after forces diverted the river away from the city in 1372.
European explorers to visit the area include Pyotr Kuzmich Kozlov and John DeFrancis .
The river area has been suffering from acute desertification. Ground water levels have dropped by as much as 5 meters since the 1940s, while forest coverage near the river shrunk by 1924 km? between 1958 and 1994 and the Juyanhai Lake, once 1200 km?., has dried up entirely.