Xianyang (simplified Chinese: 咸阳; traditional Chinese: 咸陽; pinyin: Xiányáng; IPA: [ɕjɛ̌n.jɑ̌ŋ]) 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 Xi'an. Integrated into the Xi'an 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 city's 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 Chang'an 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 (新城, Xīnchéng) 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 (阿房宮, Ēfánggōng).
In 202 BC, after defeating Xiang Yu, Liu Bang built a new city near the old Xianyang and named this new capital Chang'an. The Han-era town of Anling (安陵) was located nearby and houses some of the Han dynasty's 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.
Chinese Bureau of Statistics lists the urban population of the city at 316,641 (1990 Census), rising to 814,625 (2000 Census), and 835,648 in 2010 Census. Despite being a former national capital, the city suffers from extreme air pollution.