High Curie temperature of 900 K has been reported in Cr-doped AlN diluted magnetic semiconductors prepared by various methods, which is exciting for spintronic applications. It is believed that N defects play important roles in achieving the high temperature ferromagnetism in good samples. Motivated by these experimental advances, we use a full-potential density-functional-theory method and supercell approach to investigate N defects and their effects on ferromagnetism of (Al,Cr)N with N vacancies (V_N). Calculated results are in agreement with experimental observations and facts of real Cr-doped AlN samples and their synthesis. Our first-principles results are useful to elucidating the mechanism for the ferromagnetism and exploring high-performance Cr-doped AlN diluted magnetic semiconductors.