We have investigated, by means of ab initio calculations, the electronic and magnetic structures of zigzag edge phosphorene nanoribbons (ZPNRs) with various widths. The stable magnetic state was found in pristine ZPNRs by allowing the systems to be spin-polarized. The ground state of pristine ZPNRs prefers ferromagnetic order in the same edge but antiferromagnetic order between two opposite edges. The magnetism arises from the dangling bond states as well as edge localized π-orbital states. The presence of a dangling bond is crucial to the formation of the magnetism of ZPNRs. The hydrogenated ZPNRs get nonmagnetic semiconductors with a direct band gap. While, the O-saturated ZPNRs show magnetic ground states due to the weak P-O bond in the ribbon plane between the pz-orbitals of the edge O and P atoms.