Using a first-principle method, the electronic structures and the impurity formation energy of ZnO, ZnO(N), ZnO (N+B), and ZnO (2N+B) have been calculated, based on which the feasibility to obtain p-type ZnO isdiscussed.According to the results, when ZnO is single doped by N, the acceptor level is deep, and the formation energyis negative, so the ideal p-type ZnO can not be obtained by this way.On the contrary, when 2N+B are codoped intoZnO, the acceptor level becomes much lower, and the formation energy is positive, so it is a better way to obtain p-typeZnO.