In the present paper, the lattice structure, band structure and density of state of pure and P-doped ZnO are calculated by first-principle method based on density functional theory. By analyzing the Mulliken charge overlap population and bond length, it is found that the bond of P-Zn is longer and stronger than O-Zn bond for PO-ZnO. But for PZn-ZnO, the O-P bond becomes shorter and more powerful than O-Zn bond. Also, weak O-O bonds are formed in this case. Our results show that the final total energy of PO-ZnO is lower than PZn-ZnO. The lattice structure of PO-ZnO is more stability than PZn-ZnO. For PO-ZnO, The Fermi level moves into the valence band, which expresses that the holes appear on the top of valence band and thus the PO-ZnO exhibits p-type conductivity. For PZn-ZnO, the Fermi level moves up to the conductor band and the total density of states shifts to the lower energy region, thus PZn-ZnO shows the n-type conductivity.