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-H2D+ properties (e.g. column density and fractional abundance with respect to H2) 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, [N2D+]/[N2H+] deuterium fractionation, and level of CO depletion. Methods. We used the Atacama Pathfinder EXperiment (APEX) telescope to observe the 372 GHz o-H2D+(JKa, Kc = 11, 0−11, 1) line towards three prestellar cores and three protostellar cores in Orion B9. We also employed our previous APEX observations of C17O, C18O, N2H+, and N2D+ line emission, and 870 μm dust continuum emission towards the target sources. Results. The o-H2D+(11, 0−11, 1) line was detected in all three prestellar cores, but in only one of the protostellar cores. The corresponding o-H2D+ abundances were derived to be ~ (12−30) × 10−11 and ~ 6 × 10−11. Two additional spectral lines, DCO+(5−4) and N2H+(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 theo-H2D+ abundance and gas temperature obeyed by other low-mass dense cores. The o-H2D+ abundance was found to decrease as the core evolves. Conclusions. The o-H2D+ 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-H2D+ 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 H2D+. The validity of using the [o-H2D+]/[N2D+] 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-H2D+]/[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-H2D+ and D2H+ would be of particular interest.