The unstable thioborine molecule and its deuterated variant have been produced by a high-temperature reaction between hydrogen sulfide and crystalline boron at 1100 degrees C in a flow system. Five rotational transitions from J = 2 <-- 1, to J = 6 <-- 5 have been recorded with sub-Doppler resolution for the vibrational ground state of H10/11BS and D10/11BS using the Lamb-dip technique. The hyperfine structure due to the electric quadrupole interaction of deuterium nucleus has been resolved yielding the first experimental determination of the deuterium quadrupole coupling constant in thioborine, which is 0.1403(75) MHz in D11 BS and 0.1360(38) MHz in D10BS. Fairly accurate values of 10/11B spin-rotation coupling constants and of the hydrogen-boron spin-spin coupling constants have also been determined. Additionally, the hyperfine structure of the rotational lines for the nu2 = 1 excited state has been investigated, thus obtaining information on the asymmetry of the electric field gradient at the B nucleus in the bending state.