The fall of the Tokugawa Shogunate in 1867 and the Meiji Restoration, by which (in theory) all power to govern was returned to the court, was the final result of several decade long trends that began long before there was any sign of a weakening shogunate as well as the very specific actions and beliefs of people close to the court. The most important trends that caused the Meiji Restoration were pressure on Japan to open for trade from foreign countries as early as the 1840s and the development and desire for independence of powerful domains such as the Satsuma and Choshu. The two most important players in the Meiji restoration were Meiji's father, Emperor Komei, because of his stubbornness in maintaining tradition and his conservatism; and Iwakura Tomomi, an important nobleman, for his schemes against the court and, ultimately, his role in the death of Emperor Komei.
Until around the time of Komei's coronation, Japan had enjoyed natural isolation because of its location. In the past it had been difficult to get to, making trade and invasions impractical. However, with the development of better kinds of ships in the early 1800s an increasing number of foreigners began to arrive on Japanese soil.
The official records of Emperor Komei refer to two visits by foreign ships in 1846, the year before his coronation. One of these was an American ship under the command of Commodore James Biddle that attempted, unsuccessfully, to establish trading rights in Japan. The second of these was an unidentified French warship. One of the most important of these early visits to Japan was that of Commodore Matthew Perry in 1853. His fleet of four ships sailed into the port of Uraga, near Edo, demanding to speak with a high ranking Japanese officer to deliver a message from Washington. At Uraga, they were rejected and told to proceed to Nagasaki but the Americans would not play by the Japanese rules and threatened to land by force if the document was not received.