Oxygen availability is a major factor and evolutionary force determining the metabolic strategy of bacteria colonizing an environmental niche. In the soil, conditions can switch rapidly between oxia and anoxia, forcing soil bacteria to remodel their energy metabolism accordingly. Mycobacterium is a dominant genus in the soil, and all its species are obligate aerobes. Here we show that an obligate aerobe, the soil actinomycete Mycobacterium smegmatis, adopts an anaerobe-type strategy by activating fermentative hydrogen production to adapt to hypoxia. This process is controlled by the two-component system DosR-DosS/DosT, an oxygen and redox sensor that is well conserved in mycobacteria. We show that DosR tightly regulates the two [NiFe]-hydrogenases: Hyd3 (MSMEG_3931-3928) and Hyd2 (MSMEG_2719-2718). Using genetic manipulation and high-sensitivity GC, we demonstrate that Hyd3 facilitates the evolution of H 2 when oxygen is depleted. Combined activity of Hyd2 and Hyd3 was necessary to maintain an optimal NAD + /NADH ratio and enhanced adaptation to and survival of hypoxia. We demonstrate that fermentativelyproduced hydrogen can be recycled when fumarate or oxygen become available, suggesting Mycobacterium smegmatis can switch between fermentation, anaerobic respiration, and aerobic respiration. Hydrogen metabolism enables this obligate aerobe to rapidly meet its energetic needs when switching between microoxic and anoxic conditions and provides a competitive advantage in low oxygen environments.