During the Battle of Toba-Fushimi in 1868, he was appointed a staff officer of the navy on the side of the new government in March, but returned briefly to his hometown because of illness.
慶応4年（1868年）の鳥羽伏見の戦いでは、3月に新政府側の海軍参謀に任命されたが病のため一時帰郷。