During the Bakumatsu period, he entered the administration of the Tokugawa shogunate, first as "Sōshaban" (Master of Ceremonies) in 1858, as "Jisha-bugyō" in 1861, then as "Rōjū" (Senior Councilor) in 1862 under "Shōgun" Tokugawa Ienari. His court rank was correspondingly increased to Lower 4th. In 1863–1864 he participated in the discussions within Edo Castle on the ending of Japan’s national isolation policy and the signing of the unequal treaties with the western powers. Dismissed as "Rōjū" on July 12, 1864, he was reappointed again on November 26, 1865. In 1866, he participated in the Second Chōshū expedition by the command of the shogunal deputy in Kyoto, Tokugawa Yoshinobu. He resigned again on June 17, 1867.