The black city, Tangut language, transcribed into Chinese as 亦集乃 Yijinai, paraphrased to (Modern) Mongolian as Khar khot (Middle Mongolian:Khara Khoto, "black city") , was a Tangut city in the Ejinaqi of Alxa League, in western Inner Mongolia, near the former Gashun Lake. It has been identified as the city of Etzina, which appears in The Travels of Marco Polo.The city was founded in 1032 and became a thriving center of Tangut Empire trade in the 11th century. There are remains of 30-foot (9.1 m)-high ramparts and 12-foot (3.7 m)-thick outer walls.The outer walls ran for some 421 m (1,381 ft) east-west by 374 m (1,227 ft) north-south.
The walled fortress was first taken by Genghis Khan in 1226, but—contrary to a widely circulated misunderstanding—the city continued to flourish under Mongol overlordship. During Kublai Khan's time, the city was expanded, reaching a size three times bigger than during the Tangut Empire. Togoontemur Khan concentrated his preparation for reconquest of China at Khara-Khoto. The city was located on the crossroads connecting Karakorum, Xanadu and Kumul.
In The Travels of Marco Polo, Marco Polo describes a visit to a city called Etzina or Edzina, which has been identified with Khara-Khoto.
When you leave the city of Campichu you ride for twelve days, and then reach a city called Etzina, which is towards the north on the verge of the Sandy Desert; it belongs to the Province of Tangut. The people are Idolaters, and possess plenty of camels and cattle, and the country produces a number of good falcons, both Sakers and Lanners. The inhabitants live by their cultivation and their cattle, for they have no trade. At this city you must needs lay in victuals for forty days, because when you quit Etzina, you enter on a desert which extends forty days' journey to the north, and on which you meet with no habitation nor baiting-place.
— Marco Polo, The Travels of Marco Polo, translated by Henry Yule, 1920
According to a legend by the local Torghut population, in 1372 a Mongol military general named Khara Bator (Mongolian: Black hero) was surrounded with his troops by the armies of China's Ming dynasty. Diverting the Ejin River, the city's water source that flowed just outside the fortress, the Chinese denied Khara-Khoto water for its gardens and wells. As time passed and Khara Bator realised his fate, he murdered his family and then himself. After his suicide, Khara Bator's soldiers waited within the fortress until the Ming finally attacked and killed the remaining inhabitants. Another version of the legend holds that Khara Bator made a breach in the northwestern corner of the city wall and escaped through it. The remains of the city has a breach through which a rider can pass.
The defeat of the Mongols at Kharakhoto is described in the Ming dynasty annals: "In the fifth year of Hungu (1372) General Feng Sheng and his army reached Edzina. The town's defender Buyan'temur, surrendered, and Chinese troops reached the mountains of Bojiashan. The ruler of Yuan, Gyardzhipan', fled. His minister... and 27 others were captured, together with ten or more thousand head of horses and cattle." After the defeat, and also possibly due to real water shortage, the city was abandoned and left in ruins. Its exceedingly remote location preserved it from looters.
Russian explorers Grigory Potanin and Vladimir Obruchev heard rumours that somewhere downstream Ejin River an ancient city was waiting. This knowledge gave impetus to the Asian Museum, St. Petersburg, to launch a new Mongol-Sichuan expedition under the command of Pyotr Kuzmich Kozlov.
During the 1907-1909 expedition to Central Asia, in 1908, Kozlov made the historical discovery of Khara-Khoto. With a dinner and gift of a grammophone to a local Torghut lord Dashi Beile, Kozlov obtained a permission to dig in the site, arriving on May 1, 1908 to Khara-Khoto ruins. Over 2,000 books, scrolls and manuscripts in the Tangut language were uncovered. Kozlov initially sent ten chests of manuscripts and Buddhist objects to St. Petersburg, returning again in May 1909 for more objects. The books and woodcuts were found in June, while excavating a stupa outside city walls some 400 m (1,300 ft) westward.
Sir Aurel Stein excavated Khara-Khoto during his third Central Asian expedition in 1917, surveying Khara-Khoto for eight days. The findings from this research was incorporated in chapter 13 of Stein's first volume of Innermost Asia.
Langdon Warner visited Khara-Khoto in 1925.
Folke Bergman first travelled to Khara-Khoto in 1927, returning in 1929 and staying for a year and a half in the area. He made maps of Khara-Khoto and the Ejin River area, surveyed watchtowers and fortresses, finding a large number of xylographs. Bergman noted that Kozlov's and Stein's visits were cursory and some of their published documentation was partially incorrect.
Sven Hedin and Xu Bingchang led the Sino-Swedish Expedition on archaeological excavations of the site between 1927–31. After Hedin, John DeFrancis visited in 1935.
Further Chinese excavations between 1983 and 1984 by Li Yiyou, Inner Mongolian Institute of Archaeology, have produced some 3,000 more manuscripts. In addition to books, these excavations unearthed building materials, daily items, production instruments and religious art.Satellite photos show that the site is currently being preserved.