Edo was not the capital of Japan. The emperor lived in the capital, Kyoto. However, since the shogun was more powerful than the emperor throughout Japanese history, Edo had more power. After about 263 years, the Meiji Restoration removed the shogun from power. In 1869, the 17-year-old Emperor Meiji moved to Edo. The old Edo Castle became the Kokyo, the Imperial Palace.