He was born in Matsuyama, Bicchu Province, as the second son of Sanjiro-Tomoyuki TANI, who was a feudal retainer of Matsuyama Domain of Bicchu Province (Hatabugyo [flag magistrate], with a stipend of 120-koku crop yield and a yakuryo [executive allowance] of 20-koku).
備中松山藩士（旗奉行、120石・役料20石）・谷三治郎供行の二男として備中松山に生まれる。