Microbial communities play a key role in maintaining agroecosystem functioning and sustainability, but their response to excessive animal manure application and relevant mechanisms have not been thoroughly elucidated to date. This study investigated the responses of soil bacterial and fungal communities to pig manure (PM) amendment in red paddy soils. High-throughput sequencing revealed that PM amendment significantly reduced the relative abundance of Acidobacteria yet increased that of Bacteroidetes, Ignavibacteriae, Firmicutes, and Rozellomycota. The Cu and available phosphorus were the primary impact factors influencing bacterial and fungal diversity, respectively. Bacterial alpha-diversity tended to sharply decrease when the content of soil Cu was >30.70 mg kg-1, while fungal alpha-diversity did not continuously increase when the content of soil available phosphorus was >82.84 mg kg-1. Bacterial communities with a wider niche breadth showed significantly lower structural variation, whereas fungal communities with a narrower niche breadth showed greater variation in community structure. Soil heavy metals, primarily Cu and Zn, were the primary factors that affected bacterial communities, whereas soil fungal communities were mainly influenced by soil phosphorus. Bacterial and fungal communities showed distinct co-occurrence patterns, with bacterial communities showing a higher degree, a clustering coefficient, and betweenness centrality, but a lower closeness centrality. The findings highlighted that bacteria and fungi responded differently to PM amendment because of their discrepant niche breadth, interspecific relationships, and different tolerance to heavy metal and soil nutrient.