Recently, we successfully synthesized the nitrogen-deficient manganese antiperovskites AlNxMn3 with the very high ferromagnetic Curie temperatures TC up to 818 K [Lin et al., Appl. Phys. Lett. 98, 092507 (2011)]. In order to figure out the role of nitrogen for the magnetism, in the present work, we performed a theoretical investigation on AlNxMn3 through the first-principles calculation based on density functional theory. The results show that AlNxMn3 have the ferromagnetic ground states, and the total magnetic moments in a cell are enhanced with decreasing the nitrogen concentration. Based on the calculations of band structure and density of states, we showed the influence of nitrogen concentration on magnetism for AlNxMn3: The decreasing of nitrogen concentration from ideal AlNMn3 moves the spin-down bands towards the high energy remarkably, which enhances the exchange splitting energy ΔEex; on the other hand, nitrogen deficiency reduces the Mn-N hybridizations, which makes the 3d electrons of Mn tend to occupy the spin-up states. The nitrogen deficiency reduces the Mn-N hybridization, which narrows Mn-d bands and enhances the spin polarization. Furthermore, we estimated TC of AlNxMn3, and found the calculated TC can be scaled by spin fluctuation temperature TSF, suggesting AlNxMn3 belong to the spin fluctuation system.