Microbes play pivotal roles in soil organic matter (SOM) turnover: formation and decomposition. Organic fertilizers play crucial role for SOM accumulation, aggregate formation and influence microbial community composition and co-occurrence networks in microhabitats. Here, we investigated prokaryotic and fungal communities and their co-occurrence networks in four aggregate size classes in upland Ultisol following 27 years of mineral and/or organic fertilizer (rice straw, peanut straw, radish, or pig manure) application. Organic fertilizers and aggregate size classes have main and interactive effects on SOM content in aggregates (p < 0.001). Aggregate size classes accounted for most of the variance (43%) of SOM content, with more SOM accumulated in macroaggregates (>250 μm) than microaggregates (<250 μm). Increased aggregate size affected prokaryotic and fungal community structure by increasing Rhizobiales and decreasing Eurotiales. Solibacterales and Mortierellales were particularly abundant in small microaggregates (<53 μm) due to substrate preferences. Organic fertilizers regulate microbial community structure more than aggregate size, accounting for 41% and 29% of variance in prokaryotic and fungal communities, respectively. Pig manure exerted the strongest effect on SOM content and aggregation, and influenced microbial community structure more strongly than plant residues, primarily by increasing Bacillales, Gaiellales and Pezizales, and decreasing Thermogemmatisporales. This effect of pig manure was related with efficient increase of SOM content and pH. Co-occurrence network analysis revealed more positive or negative linear relationships among microbial groups in microaggregates than in macroaggregates, indicating stronger synergistic and antagonistic microbial interactions in microaggregates with fewer favorable niches (higher recalcitrant SOM and less labile SOM). Thermogemmatisporales was identified as the most influential keystone taxon (relative abundance ∼4.9%) in soil, and its abundance rapidly diminished with increasing SOM content in macro- and microaggregates. Thus, microbial community structure is dependent on aggregate size, and this should be considered during sampling. Overall, long-term pig manure amendment increased the SOM content and aggregation, altering prokaryotic and fungal community structure and keystone taxa. © 2019 Elsevier Ltd