Recent physiological and ecological studies have challenged the long-held belief that microbial metabolism of molecular hydrogen (H2) is a niche process. To gain a broader insight into the importance of microbial H2 metabolism, we comprehensively surveyed the genomic and metagenomic distribution of hydrogenases, the reversible enzymes that catalyse the oxidation and evolution of H2. The protein sequences of 3286 non-redundant putative hydrogenases were curated from publicly available databases. These metalloenzymes were classified into multiple groups based on (1) amino acid sequence phylogeny, (2) metal-binding motifs, (3) predicted genetic organisation and (4) reported biochemical characteristics. Four groups (22 subgroups) of [NiFe]-hydrogenase, three groups (6 subtypes) of [FeFe]-hydrogenases and a small group of [Fe]-hydrogenases were identified. We predict that this hydrogenase diversity supports H2-based respiration, fermentation and carbon fixation processes in both oxic and anoxic environments, in addition to various H2-sensing, electron-bifurcation and energy-conversion mechanisms. Hydrogenase-encoding genes were identified in 51 bacterial and archaeal phyla, suggesting strong pressure for both vertical and lateral acquisition. Furthermore, hydrogenase genes could be recovered from diverse terrestrial, aquatic and host-associated metagenomes in varying proportions, indicating a broad ecological distribution and utilisation. Oxygen content (pO2) appears to be a central factor driving the phylum- and ecosystem-level distribution of these genes. In addition to compounding evidence that H2 was the first electron donor for life, our analysis suggests that the great diversification of hydrogenases has enabled H2 metabolism to sustain the growth or survival of microorganisms in a wide range of ecosystems to the present day. This work also provides a comprehensive expanded system for classifying hydrogenases and identifies new prospects for investigating H2 metabolism.