Beijing is made up of the Chinese characters 北京. 北 (bei) means north and 京 (jing) is capital -- thus Beijing means "northern capital," referring to the city's location in the north of China.
Similarly Nanjing 南京 in the south of the country is 南 (nan; south) 京 (jing; capital) -- "southern capital."
In Japan, Tokyo is 東京 -- "eastern capital".
Beijing is often referred to in English as "Peking" and "Pekin" in Japanese. Beijing has been known by other names throughout its history including Youzhou, Zhongdu, Dadu, Shuntian, Peiping, and Yanjing.
ouzhou (幽州) was the name of the Beijing city in the Tang Dynasty (618–907) .
Zhongdu (中都) "Central Capital" refers to the area just to the south west of modern Beijing which was the capital of the barbarian Jin Dynasty (1115–1234).
Dadu (大都) "great capital" is the Chinese rendering of Khanbaliq - the new city built by Kublai Khan in 1264, which became the capital of the Yuan Dynasty (1271-1368). Marco Polo refers to the city at this time as "Cambulac."
Shuntian (顺天) refers to the new name of the capital after the defeat of the Mongols and the establishment of the Ming Dynasty (1368-1644).
Peiping, (北平) "Northern Peace" was a term used in 1928 as the capital was at this time in Nanjing.
The city became Beijing in 1949 following the Communist takeover. Yanjing (燕京) is an informal name for Beijing and is also the name of a local Chinese beer. Yanjing refers to the State of Yan that existed around the area of present-day Beijing during the Zhou Dynasty (1122-256 BCE).