Another Chinese city similarly named is NanJing, meaning south capital.
At times in history, the capital was declared to be NanJing rather than BeiJing, according to whether the then current powerbase lay to the north or south of China.
Emperor Wu was the first to declare the site of Beijing as the capital in 1057 BC. Subsequently, the city has gone by the names of Ji, ZhongDu, Dadu, then finally Beijing when the name was chosen by the Ming Dynasty Emperor ChengZu in 1421. Before 1949, Beijing was known as Peking by the Western world. Beijing was once again the capital only when Mao ZeDong declared the Peoples Republic of China on October 1st 1949.
Beijing first served as the capital of a (more or less) united China in 1264 when Kublai Khans victorious Mongol forces set up the city of Dadu (Great Capital) to rule their new empire, from a northern location closer to the Mongol homelands. After the fall of the Mongol Yuan dynasty in 1368, the capital was moved back to Nanjing, but in 1403, the 3rd Ming emperor Zhu Di moved it to Beijing again and also gave the city its present name.
This was Beijings golden era: the Forbidden City, the Temple of...