Subtropical moss peatlands have important ecological functions, and their protection and restoration are urgent. In this study, typical subtropical moss peatlands and the Cryptomeria swamp forest (CSF) formed by long-term (more than 20 years) drainage and afforestation in the Yunnan-Guizhou Plateau of China were selected as the research sites. 16S rRNA high-throughput sequencing technology was used to study the differences in soil bacterial community diversity and composition among a natural Sphagnum fen (SF), Polytrichum bog (PB) and CSF to explore the effects of drainage and afforestation on different types of moss peatlands and its mechanism combined with soil physicochemical properties. Results showed that (1) drainage and afforestation significantly reduced the α diversity of soil bacterial communities in SF, while significantly increased the α diversity of soil bacterial communities in PB. Soil bacterial communities of SF had the highest α diversity and had many unique species or groups at different taxonomic levels. (2) The impact of drainage and afforestation on the soil bacterial community composition in SF was significantly higher than that in PB. Drainage and afforestation caused significant changes in the composition and relative abundance of dominant groups of soil bacteria in SF at different taxonomic levels, such as significantly reducing the relative abundance of Proteobacteria, significantly increasing the relative abundance of Acidobacteria, and significantly reducing the ratio of Proteobacteria to Acidobacteria, but did not have a significant impact on the corresponding indicators of PB. The changes in the ratio of Proteobacteria to Acidobacteria may reflect changes in the trophic conditions of peatlands. (3) Soil moisture content, available phosphorus content, and pH were key driving factors for changes in soil bacterial community composition and diversity, which should be paid attention to in the restoration of moss peatlands.