Edo (江戸, literally: bay-door, "estuary"), once also spelled Yedo, is the former name of Tokyo. While there have been early settlements on the hills at the Bay of Tokyo for several centuries, the first major event in the history of Edo was the building of the Edo Castle in 1457 by Ota Dokan.
The Tokugawa shogunate was established in 1603 with Edo as its seat of government (de facto capital). (The emperor's residence, and formal capital, remained in Kyoto, that city had been the actual capital of Japan until that time.) In 1868, when the shogunate came to an end, the city was renamed "Tokyo" which means "Eastern Capital"; during the restoration, the emperor moved to Tokyo, making the city the formal as well as de facto capital of Japan.