Clarifying changes in the microbial community in deadwood at different stages of decomposition is crucial for comprehending the role of deadwood in the biogeochemical processes and the sustainability of forest development. However, there have been no reports on the dynamics of microbial community during the decomposition of Pinus massoniana. We used the “space‐for‐time” substitution to analyze the characteristics of microbial community changes and the key influencing factors in the P. massoniana deadwood during different decomposition stages by 16S and ITS rRNA gene sequencing. The results suggest that the microbial community structure of the early decomposition (decay class I) was significantly different from the other decay classes, while the diversity and richness of the microbial community were the highest in the late decomposition (decay class V). The Linear Discriminant Analysis Effect Size analysis revealed that most bacterial and fungal taxa were significantly enriched in decay classes I and V deadwood. During the initial stages of decomposition, the relative abundance of the bacterial functional group responsible for carbohydrate metabolism was greater than the later stages. As decomposition progressed, the relative abundance of saprophytic fungi gradually decreased, and there was a shift in the comparative abundance of mixed saprophytic‐symbiotic fungi from low to high before eventually decreasing. Total organic carbon, total nitrogen, carbon‐to‐nitrogen ratio, total potassium, total phenol, condensed tannin, lignin, and cellulose were significantly correlated with microbial community structure, with the carbon‐to‐nitrogen ratio having the greatest effect. Our results indicate that the physicochemical properties of deadwood, microbial community structural composition and functional group changes were related to the decay class, among which the carbon‐to‐nitrogen ratio may be an important factor affecting the composition and diversity of microbial communities.