Many moss species are associated with nitrogen (N)-fixing bacteria (diazotrophs) that support the N supply of mosses. Our knowledge relates primarily to pristine ecosystems with low atmospheric N input, but knowledge of biological N fixation (BNF) and diazotrophic communities in mosses in temperate forests with high N deposition is limited. We measured BNF rates using the direct stable isotope method and studied the total and potentially active diazotrophic communities in two abundant mosses, Brachythecium rutabulum and Hypnum cupressiforme, both growing on lying deadwood trunks in 25 temperate forest sites. BNF rates in both mosses were similar to those observed in moss species of pristine ecosystems. H. cupressiforme fixed three times more N2 and exhibited lower diazotrophic richness than B. rutabulum. Frankia was the most prominent diazotroph followed by cyanobacteria Nostoc. Manganese, iron, and molybdenum contents in mosses were positively correlated with BNF and diazotrophic communities. Frankia maintained high BNF rates in H. cupressiforme and B. rutabulum even under high chronic N deposition in Central European forests. Moss N concentration and 15 N abundance indicate a rather minor contribution of BNF to the N nutrition of these mosses.