Context. Initial conditions and very early stages of star formation can be probed through spectroscopic observations of deuterated molecular species. Aims. We aim to determine the ortho-H 2 D + properties (e.g. column density and fractional abundance with respect to H 2 ) in a sample of dense cores in the Orion B9 star-forming filament, and to compare those with the previously determined source characteristics, in particular with the gas kinetic temperature, [N 2 D + ]/[N 2 H + ] deuterium fractionation, and level of CO depletion. Methods. We used the Atacama Pathfinder EXperiment (APEX) telescope to observe the 372 GHz o-H 2 D + (J Ka, Kc = 1 1, 0 − 1 1, 1 ) line towards three prestellar cores and three protostellar cores in Orion B9. We also employed our previous APEX observations of C 17 O, C 18 O, N 2 H + , and N 2 D + line emission, and 870 µm dust continuum emission towards the target sources.Results. The o-H 2 D + (1 1, 0 − 1 1, 1 ) line was detected in all three prestellar cores, but in only one of the protostellar cores. The corresponding o-H 2 D + abundances were derived to be ∼ (12 − 30) × 10 −11 and ∼ 6 × 10 −11 . Two additional spectral lines, DCO + (5 − 4) and N 2 H + (4 − 3), were detected in the observed frequency bands with high detection rates of 100% and 83%, respectively. We did not find any significant correlations among the explored parameters, although our results are mostly consistent with theoretical expectations. Also, the Orion B9 cores were found to be consistent with the relationship between the o-H 2 D + abundance and gas temperature obeyed by other low-mass dense cores. The o-H 2 D + abundance was found to decrease as the core evolves. Conclusions. The o-H 2 D + abundances in the Orion B9 cores are in line with those found in other low-mass dense cores and larger than derived for high-mass star-forming regions. The higher o-H 2 D + abundance in prestellar cores compared to that in cores hosting protostars is to be expected from chemical reactions where higher concentrations of gas-phase CO and elevated gas temperature accelerate the destruction of H 2 D + . The validity of using the [o-H 2 D + ]/[N 2 D + ] abundance ratio as an evolutionary indicator, which has been proposed for massive clumps, remains to be determined when applied to these target cores. Similarly, the behaviour of the [o-H 2 D + ]/[DCO + ] ratio as the source evolves was found to be ambiguous. Still larger samples and observations of additional deuterated species are needed to explore these potential evolutionary indicators further. The low radial velocity of the line emission from one of the targeted prestellar cores, SMM 7 (∼ 3.6 km s −1 versus the systemic Orion B9 velocity of ∼ 9 km s −1 ), suggests that it is a chance superposition seen towards Orion B9. Overall, as located in a dynamic environment of the Orion B molecular cloud, the Orion B9 filament provides an interesting target system to investigate the deuterium-based chemistry, and further observations of species like para-H 2 D + and D 2 H + would be of...