Sphagnum‐dominated peatlands comprise a globally important pool of soil carbon (C) and are vulnerable to climate change. While peat mosses of the genus Sphagnum are known to harbor diverse microbial communities that mediate C and nitrogen (N) cycling in peatlands, the effects of climate change on Sphagnum microbiome composition and functioning are largely unknown. We investigated the impacts of experimental whole‐ecosystem warming on the Sphagnum moss microbiome, focusing on N2 fixing microorganisms (diazotrophs). To characterize the microbiome response to warming, we performed next‐generation sequencing of small subunit (SSU) rRNA and nitrogenase (nifH) gene amplicons and quantified rates of N2 fixation activity in Sphagnum fallax individuals sampled from experimental enclosures over 2 years in a northern Minnesota, USA bog. The taxonomic diversity of overall microbial communities and diazotroph communities, as well as N2 fixation rates, decreased with warming (p < 0.05). Following warming, diazotrophs shifted from a mixed community of Nostocales (Cyanobacteria) and Rhizobiales (Alphaproteobacteria) to predominance of Nostocales. Microbiome community composition differed between years, with some diazotroph populations persisting while others declined in relative abundance in warmed plots in the second year. Our results demonstrate that warming substantially alters the community composition, diversity, and N2 fixation activity of peat moss microbiomes, which may ultimately impact host fitness, ecosystem productivity, and C storage potential in peatlands.