Bacterial communities form the basis of biogeochemical processes and determine plant growth and health. Mosses, an abundant plant group in many Arctic ecosystems, harbour diverse bacterial communities that are for instance involved in nitrogen fixation. Global climate change is causing changes in aboveground plant biomass and shifting species composition in the Arctic, but little is known about the response of the moss microbiome. Here, we study the bacterial community associated with the moss Racomitrium lanuginosum, a common species in the Arctic, in a 20-year in situ warming experiment in an Icelandic heathland. We evaluate changes in bacterial community composition and diversity. Further, we assess the consequences of warming for nifH gene copy numbers and nitrogen fixation rates. Our findings indicate an increase in the relative abundance of Proteobacteria and a decrease in the relative abundance of Cyanobacteria and Acidobacteria with warming. The nifH gene copy number decreases, while the rate of nitrogen fixation is not affected. This contradiction could be explained by a shift in the nitrogen fixing bacterial community. Although climate warming might not change the contribution of R. lanuginosum to nitrogen input in nitrogen-limited ecosystems, the microbial community resilience and the nitrogen fixing taxa may shift.