The large amount of nitrogen lost of livestock manure could directly affect the value of the fertiliser and increase environmental pollution during the composting. Intermittent aeration could influence nitrogen losses dynamics, but based on energy consumption control, there are fewer studies on nitrogen losses from different aeration methods at the same aeration volume. Therefore, under the same aeration volume, continuous low aeration (AR0.2), intermittent medium aeration (AR0.3, 40-min on and 20-min off) and intermittent high aeration (AR0.6, 20-min on and 40-min off), were set up to investigate the effect of aeration on nitrogen loss during the pig manure composting process and to reveal the microbial mechanisms. The results indicated that compared to AR0.2, the higher the aeration rate and the longer the interval, the higher the degree of humification and GI value and the lower the nitrogen loss, at the same total aeration volume. The AR0.6 increased the humic acid-like material by 101.03% and the germination index by 19.74% in the compost products. AR0.6 promoted the process of ammonification and nitrogen retention by enriching microorganisms carrying the ammonification gene chiA (Actinomadura) and the nitrogen retention gene nifH (Thermoactinomycetaceae) during the cooling and maturation periods, increasing the NH4+ content by 4.93%. AR0.6 enhanced the abundance of microorganisms carrying the nitrification hao, nxrA (Streptomyces), and suppressed nitrification to reduce NH3 emissions by 35.45%. It also restrained microorganisms carrying the denitrification genes narG/nirS (Ammoniibacillus) and increased nosZ abundance to reduce N2O emissions by 35.06%. As a result, total nitrogen losses were reduced by 10.29%. Considering the maturity and nitrogen loss, an aeration rate of 0.72 L·kg-1 DM·min-1 with 20-min on and 40-min off should be a better aeration method for the composting process of pig manure with the same aeration volume.