Before 1868, Tokyo was called Edo and was the actual seat of power in Japan, with the military government bakufu resident there. At the time, it was one of the most populated cities on earth with over 1 million inhabitants.
However, in 1868 when the bakufu came to an end, the emperor was moved from Kyoto to Edo, soon renamed Tokyo (東京) meaning the Eastern Capital. Where are the Northern, Southern and Western capitals then? If you move your finger on the map in those directions away from Tokyo, you will quickly find that Beijing (北京) is the northern one, and Nanjing (南京) is the southern one. Both were the capitals of either united China or various Chinese kingdoms at different periods of time.
The western capital may not be obvious, it is Xi’an (西安). The an bit was an auspicious wish for peace for the city and its kingdom. Together with Luoyang (洛陽), after whose layout Kyoto’s was modeled, those are the Four Great Capitals of China. Thus, Tokyo, by way of its name, latches on to this noble and ancient lineage, positioning itself as its inheritor.