The electronic structures of pure, Zn doped, and Zn, O codoped wurtzite AlN are calculated by using first-principles ultrasoft pseudopotential approach to the plane wave based on the density functional theory, and the crystal structure, the energy bands, the electronic density of states, the differential charge distribution and the charge population. The results show that in the Zn, O codoped method, the introduction of active donator, atom O, causes acceptor energy level to shift toward low energy, thereby forming the energy levels of shallow acceptor. At the same time, the energy band widens and nonlocal characteristics become significant, thereby increasing the doping concentration of Zn atoms and the stability of the system. Zn, O codoping is more conducible to obtaining the p-type AlN.