HemAT from Bacillus subtilis (HemAT-Bs) is a heme-based O2 sensor protein that acts as a signal transducer responsible for aerotaxis. HemAT-Bs discriminates its physiological effector, O2, from other gas molecules to generate the aerotactic signal, but the detailed mechanism of the selective O2 sensing is not obvious. In this study, we measured electronic absorption, electron paramagnetic resonance (EPR), and resonance Raman spectra of HemAT-Bs to elucidate the mechanism of selective O2 sensing by HemAT-Bs. Resonance Raman spectroscopy revealed the presence of a hydrogen bond between His86 and the heme propionate only in the O2-bound form, in addition to that between Thr95 and the heme-bound O2. The disruption of this hydrogen bond by the mutation of His86 caused the disappearance of a conformer with a direct hydrogen bond between Thr95 and the heme-bound O2 that is present in WT HemAT-Bs. On the basis of these results, we propose a model for selective O2 sensing by HemAT-Bs as follows. The formation of the hydrogen bond between His86 and the heme propionate induces a conformational change of the CE-loop and the E-helix by which Thr95 is located at the proper position to form the hydrogen bond with the heme-bound O2. This stepwise conformational change would be essential to selective O2 sensing and signal transduction by HemAT-Bs.