In soils halogens (fluorine, chlorine, bromine, iodine) are cycled through the transformation of inorganic halides into organohalogen compounds and vice versa. There is evidence that these reactions are microbially driven but the key enzymes and groups of microorganisms involved are largely unknown. Our aim was to uncover the diversity, abundance and distribution of genes encoding for halogenating and dehalogenating enzymes in a German forest soil by shotgun metagenomic sequencing. Metagenomic libraries of three soil horizons revealed the presence of genera known to be involved in halogenation and dehalogenation processes such as Bradyrhizobium or Pseudomonas. We detected a so far unknown diversity of genes encoding for (de)halogenating enzymes in the soil metagenome including specific and unspecific halogenases as well as metabolic and cometabolic dehalogenases. Genes for non-heme, no-metal chloroperoxidases and haloalkane dehalogenases were the most abundant halogenase and dehalogenase genes, respectively. The high diversity and abundance of (de)halogenating enzymes suggests a strong microbial contribution to natural halogen cycling. This was also confirmed in microcosm experiments in which we quantified the biotic formation of chloroform and bromoform. Knowledge on microorganisms and genes that catalyze (de)halogenation reactions is critical because they are highly relevant to industrial biotechnologies and bioremediation applications.