Microbes are the key players in the global cycling of nitrogen (N) and carbon (C) availability and fluxes, and losses through emission of nitrous oxide (N2O) and methane (CH4), two very potent greenhouse gases.. Thus, characterization of microbial functional guilds involved in these processes is high on the political agenda. Yet, typical sequence based characterization often represents only a minor fraction of their diversity in nature due to their frequent low relative abundance, insufficient sequencing depth of traditional metagenomes of complex communities, and limitations in coverage and efficiency of PCR-based assays. Here, we developed and tested a targeted metagenomic approach based on probe capture and hybridization to simultaneously characterize the diversity of multiple key metabolic genes involved in inorganic N and CH4 cycling. We designed comprehensive probe libraries for each of the 15 selected marker genes, resulting in 264,000 unique probes in total. These probes were used to selectively enrich the target genes in shotgun metagenomic libraries. In validation experiments with a mock community of cultured microorganisms, the target gene profiles were similar to those of the original community when sequenced with targeted metagenomics. Further, relative abundances of the marker genes obtained by targeted and shotgun metagenomics from agricultural and wetland soils correlated positively, indicating that the targeted approach did not introduce a significant quantitative bias. However, targeted metagenomics generated substantially higher diversity in terms of taxonomic coverage, and a larger number of sequence reads per sample, which allowed 34 times or 18% higher diversity estimates than when using shotgun metagenomics or targeted PCR amplification, respectively. Thus, captured metagenomics complements current approaches by enabling a targeted, more detailed characterization of the diversity of key functional genes involved in N and CH4 cycling within and across ecosystems.