Xianyang (simplified Chinese: ; traditional Chinese: ; pinyin: ; ) was the capital of China in the Qin dynasty. It is a prefecture in modern-day Shaanxi province, on the Wei River, and is located a few kilometers upstream (west) from Xian. Integrated into the Xian metropolitan area, one of the main urban agglomerations in inland China, with more than 7.17 million inhabitants, its built-up area made of 2 urban districts (Qindu and Weicheng) was 945,420 inhabitants at the 2010 census. It has a total area of 10,213 square kilometres (3,943 sq mi).
Xianyang was among the capital citys environs during the Western Zhou dynasty, and was made the capital of the state of Qin in 350 BC during the Warring States period before becoming the capital of China during the short-lived Qin dynasty. Because the city lay south of the Jiuzong Mountains and north of the Wei River - both sunlight-rich (yang) orientations - it was named "Xianyang", meaning "fully yang". Under Duke Xiao of Qin, minister Shang Yang designed Xianyang in 350 BC, which was then the capital for over 140 years. It was located in the modern day Shaanxi province on the northern bank of the Wei River, on the opposite side of which Liu Bang would later build the Han dynasty capital of Changan once he became emperor.
In 221 BC, Qin Shi Huang eliminated all six other vassal states to establish the first centralized empire in Chinese history. Xianyang became the centre of politics, economy and culture of the Qin empire. The Emperor had a lavish mausoleum built near the capital, complete with his Terracotta Army. This and other large undertakings required enormous levies of manpower and resources, not to mention repressive measures, which eventually led to the fall of the Qin dynasty and with it the original city of Xianyang.
Qin Shi Huang expanded Xianyang beyond the walls. Then he built replicas of the palaces of all the conquered states along the Wei River. In 220 BC, he built Xin Palace (??, Xincheng) and later renamed it Apex temple (??) to be the earthly equivalent of the apex star (Polaris). He continued with the theme of earth as the mirror of heaven building a network of 300 palaces in the Wei valley connected by elevated roads. In 212, he built the Hilltop Palace (???, Efanggong).
Shortly after the First Emperors death in 210 BC revolts erupted. At the beginning of December 207 BC, then King of Qin Ziying surrendered to rebel leader Liu Bang. Liu Bang went on to capture Xianyang, but was forced to hand it over to another rebel leader, Xiang Yu, whose army greatly outnumbered Liu Bangs. Xiang Yu then killed Ziying and burned Xianyang in 206 BC, thereby forever robbing humanity of some unique copies of the many "forbidden books" kept in the royal library.
In 202 BC, after defeating Xiang Yu, Liu Bang built a new city near the old Xianyang and named this new capital Changan. The Han-era town of Anling () was located nearby and houses some of the Han dynastys mausoleums.
From the end of the 1950s until the middle of the 1990s, archaeologists discovered and excavated a large numbers of Qin era sites in Xianyang, including palaces, workshops and tombs.