Repeated compost or inorganic fertilization may increase soil organic C (SOC) but how SOC accumulation relates to changes in soil aggregation, microenvironment and microbial community structure is unclear. Arable soils (Aquic Inceptisol) following a 20-year (1989–2009) application of inorganic fertilizer nitrogen (N), phosphorus (P) and potassium (K) (NPK), fertilizer NP (NP), fertilizer NK (NK), fertilizer PK (PK), compost (CM), half compost N plus half fertilizer N (HCM), and non-fertilization (Control) were collected to evaluate the relationship between SOC accumulation rate, soil aggregation, microenvironment and microbial community composition using phospholipid fatty acid (PLFA) analysis. Compared to the starting year, SOC content after 20 years under CM, HCM and NPK was significantly (P < 0.05) increased by 172 %, 107 % and 56 %, respectively, and by less than 50 % under NP, NK and PK. The mass proportion of macroaggregates was increased by 101–250 % under CM, but was not significantly affected by inorganic fertilizations, except PK. Compost and NPK significantly (P < 0.05) reduced the effective diffusion coefficient of oxygen primarily by increasing the proportion of pores <4 μm, and in contrast, increased the abundance of branched PLFAs and Gram-positive (G+) bacteria, resulting in the reduction of the ratio of monounsaturated/branched PLFAs (M/B) compared with Control. The mass proportion of macroaggregates was significantly (P < 0.01) and negatively correlated with the effective diffusion coefficient of oxygen; the latter was positively associated with M/B ratio. The SOC accumulation rate (z) had a significant interaction with the mass proportion of macroaggregates (x) and M/B ratio (y) (z = 0.514 + 4.345e x-15–0.149e y ). Our results suggested that SOC accumulation promoted the macroaggregation and reduced the effective diffusion coefficient of oxygen, causing changes in microhabitats and a shift in microbial community composition to more facultative and/or obligate anaerobes; such microbial community shifts favored accumulation of SOC in turn.