The composition and structure of organic carbon are crucial factors influencing soil carbon sequestration and microbial activity. However, few studies have investigated the effects of soil organic carbon composition and structure on soil bacterial community composition under organic substitution. In this study, we conducted a long-term fertilization experiment on river alluvial soil in Yueyang, with seven treatments: no fertilization (CK), mineral NPK fertilizers only (NPK), pig manure substitution for chemical fertilizer in different proportions (30%M
1+NPK, 60%M
1+NPK,M
1), and rapeseed cake fertilizer substitution for chemical fertilizer in different proportions (30%M
2+NPK, 60%M
2+NPK). The results showed that, compared to the NPK treatment, the M
1 treatment significantly increased the levels of soluble organic carbon (DOC), readily oxidizable organic carbon (ROC), microbial biomass carbon (MBC), particulate organic carbon (POC), and mineral-associated organic carbon (MAOC). Moreover, the M
1 treatment reduced the proportion of alkoxy carbon within POC, while significantly increased alkyl carbon content, the ratio of alkyl carbon to alkoxy carbon, and the hydrophobic index. These findings suggested that POC was more stable under the M
1 treatment. Compared to the NPK treatment, the 60%M
1+NPK and M
1 treatments significantly enhanced the Chao, Ace and Shannon indices. However, the 30% and 60%M
2+NPK treatments had no significant effect. The MBC content and the proportion of aromatic carbon in POC were positively correlated with bacterial community diversity. Furthermore, both MBC and MAOC content had a substantial impact on bacterial community composition. In conclusion, the M
1 treatment was the optimal fertilization management approach to maintain soil organic carbon stability and promote microbial diversity. Our results provided theoretical support for finding an organic alternative fertilizer model conducive to sustainable agricultural development.