In 1862, he followed the lord of the clan, Katamori MATSUDAIRA, who was appointed as Kyoto shugoshoku (Military governor of Kyoto), to Kyoto, and trained the Western-style troops at the headquarters in Konkai Komyo-ji Temple as well as supervised Yogakusho (Institute of Foreign Study) to give the Western study lectures to retainers from various domains in Kyoto.
1862年（文久2年）京都守護職に就任した藩主松平容保に従い、京都市に上り金戒光明寺本陣で西洋式軍隊の調練に当たるとともに、洋学所を主宰し在京の諸藩士に洋学の講義を行った。