Mosses need to be incorporated into Earth system models to better simulate peatland functional dynamics under the changing environment. Sphagnum mosses are strong determinants of nutrient, carbon, and water cycling in peatland ecosystems. However, most land-surface models do not include Sphagnum or other mosses as represented plant functional types (PFTs), thereby limiting predictive assessment of peatland responses to environmental change. In this study, we introduce a moss PFT into the land model component (ELM) of the Energy Exascale Earth System Model (E3SM) by developing water content dynamics and nonvascular photosynthetic processes for moss. The model was parameterized and independently evaluated against observations from an ombrotrophic forested bog as part of the Spruce and Peatland Responses Under Changing Environments (SPRUCE) project. The inclusion of a Sphagnum PFT with some Sphagnum-specific processes in ELM allows it to capture the observed seasonal dynamics of Sphagnum gross primary production (GPP) albeit with an underestimate of peak GPP. The model simulated a reasonable annual net primary production (NPP) for moss but with less interannual variation than observed, and it reproduced aboveground biomass for tree PFTs and stem biomass for shrubs. Different species showed highly variable warming responses under both ambient and elevated atmospheric CO.sub.2 concentrations, and elevated CO.sub.2 altered the warming response direction for the peatland ecosystem. Microtopography is critical: Sphagnum mosses on hummocks and hollows were simulated to show opposite warming responses (NPP decreasing with warming on hummocks but increasing in hollows), and hummock Sphagnum was modeled to have a strong dependence on water table height. The inclusion of this new moss PFT in global ELM simulations may provide a useful foundation for the investigation of northern peatland carbon exchange, enhancing the predictive capacity of carbon dynamics across the regional and global scales.