After that, he was put up by shogitai (group of former Tokugawa retainers opposed to the Meiji government who fought in the Battle of Ueno) holed up in Kanei-ji Temple and thus he got involved in Ueno War and escaped to Tohoku region after defeat.
その後、寛永寺に立て篭もった彰義隊に擁立されて上野戦争に巻き込まれ、その敗北により東北地方に逃避した。