In December of 1867, on his way to a patient's house, he was arrested by Shinsengumi on suspicion of participating in the scheme to overthrow the shogunate, and he was confined to Rokkaku prison house at Nishihongan-ji Temple, which the Shinsengumi used as its headquarters.
慶応3年（1867年）12月、患者宅へ往診の途中、倒幕の計画に参画した疑いで新選組に捕らえられ、新選組が屯所にしていた西本願寺～六角獄舎に幽閉された。