大阪城
Before the feudal system could be completely overturned, castles played a role in the initial resistance to the Meiji Restoration. In January 1868, the Boshin War broke out in Kyoto, between samurai forces loyal to the disaffected Bakufu government, and allied forces loyal to the new Meiji Emperor, which consisted mainly of samurai and rōnin from the Choshu and Satsuma domains. By January 31, the Bakufu army had retreated to Osaka Castle in disarray and the "shōgun", Tokugawa Yoshinobu had fled to Edo (later Tokyo). Osaka Castle was surrendered to the Imperial forces without a fight, and on February 3, 1868, Osaka Castle was burned. The destruction of Osaka Castle, which was a significant symbol of the power of the Shogun in western Japan, dealt a major blow to the prestige of the shogunate and the morale of their troops.