From the establishment of the Tokugawa bakufu headquarters at Edo, the town became the de facto capital and center of political power, although Kyoto remained the formal capital of the country. Edo grew from what had been a small, little-known fishing village in 1457 into the largest metropolis in the world with an estimated population of 1,000,000 by 1721.
Edo was repeatedly devastated by fires, with the Great Fire of Meireki in 1657 being the most disastrous. An estimated 100,000 people died in the fire. During the Edo period, there were about 100 fires mostly begun by accident and often quickly escalating and spreading through neighborhoods of wooden machiya which were heated with charcoal fires. Between 1600 and 1945, Edo/Tokyo was leveled every 25–50 years or so by fire, earthquakes, or war.
In 1868, when the shogunate came to an end, the city was renamed Tokyo ("eastern capital"). The emperor moved his residence to Tokyo, making the city the formal capital of Japan:
Ishimaru Sadatsuga was the magistrate of Edo in 1661.
During the Edo period, Roju were senior officials that looked over the entire Shogunate government. Machi-bugyō (City Commissioners) were in charge of protecting the citizens and merchants of Edo, and Kanjō-bugyō (finance commissioners) were responsible for the financial matters of the Shogunate. 
The city was laid out as a castle town around Edo Castle. The area surrounding the castle known as Yamanote consisted largely of daimyō mansions, whose families lived in Edo as part of the sankin kōtai system; the daimyō made journeys in alternating years to Edo, and used the mansions for their entourages. It was this extensive samurai class which defined the character of Edo, particularly in contrast to the two major cities of Kyoto and Osaka neither of which were ruled by a daimyō or had a significant samurai population. Kyoto's character was defined by the Imperial Court, the court nobles, its Buddhist temples and its history; Osaka was the country's commercial center, dominated by the chōnin or the merchant class.
Areas further from the center were the domain of the chōnin (町人, "townsfolk"). The area known as Shitamachi (下町, "lower town" or "downtown"), northeast of the castle, was a center of urban culture. The ancient Buddhist temple of Sensō-ji still stands in Asakusa, marking the center of an area of traditional Shitamachi culture. Some shops in the streets near the temple have existed continuously in the same location since the Edo period.