The site of Karakorum may have been first settled about 750. In 1220 Genghis Khan, the great Mongol conqueror, established his headquarters there and used it as a base for his invasion of China. In 1267 the capital was moved to Khanbaliq (modern Peking) by Kublai Khan, greatest of the successors of Genghis Khan and founder of the Mongol (Yüan) dynasty (1206–1368) in China. In 1235 Genghis Khan’s son and successor, Ögödei, surrounded Karakorum with walls and built a rectangular palace supported by 64 wooden columns standing on granite bases. Many brick buildings, 12 shamanistic shrines, and two mosques were once part of the city, which also was an early centre for sculpture, especially noteworthy for its great stone tortoises.
In 1368, Bilikt Khan, the son of Togon Timur, the last emperor of the Mongol dynasty of China, who had been banished from Peking, returned to Karakorum, which was partly rebuilt. It was then known as Erdeni Dzu (the Mongol name for Buddha), because during the 13th century lamaistic Buddhism had made progress under Kublai Khan. In the Battle of Puir Nor in 1388, Chinese forces under the leadership of the emperor Hung-wu invaded Mongolia and won a decisive victory, capturing 70,000 Mongols and destroying Karakorum. Later it was partially rebuilt but was subsequently abandoned. The Buddhist monastery of Erdeni Dzu (built 1585), which today remains only as a museum, was built on the city site.
In 1889 the precise location of Karakorum was discovered by two Russian Orientalists working in the area, and in 1948–49 the ruins were explored by members of the Academy of Sciences of the U.S.S.R. Among their discoveries were the site of Ögödei’s palace (in the southwestern part of the city) and the remains of a late 12th- or early 13th-century Buddhist shrine.