Shuhei was born in Matsuyama of Bicchu Province (the western half of Okayama Prefecture) as the third son of Sanjiro Tomoyuki TANI, a feudal retainer of Bicchu Matsuyama clan (Flag magistrate receiving a fief of 120 koku plus a duty allowance [yakuryo] of 20 koku).
備中松山藩士（旗奉行、120石・役料20石）・谷三治郎供行の三男として備中松山に生まれる。