The Meiji Revolution saw the end of Feudal Japan and the Shogunate system of government and the capital was shifted to Edo renamed Tokyo.
Traditionally, the Japanese capital was the city where the Emperor lived. The political capital was where the Shogun lived.
Edo was a small desolate castle town when it was taken over by Shogun Ieyasu Tokugawa in about 1590. He shifted his capital there in 1603.