(Mn, N)-codope is an effective method to achieve both magnetism and p-type stability of ZnO system. In this paper, the magnetism and the p-type stability of (Mn, N)-codoped ZnO with the ratios of 1:1, 1:2 and 2:1 were analyzed through establishing a (2 × 2 × 2) ZnO supercell, in which Zn site was replaced by Mn atom and O site was replaced by N atom. The results of electronic structure analysis show that (Mn, N)-codope is easier to form stable p-type ZnO in comparison to N-mono dope. The p-d coupling between Mn 3d and N 2p states weakens the repulsive force between ions under (Mn, N)-codope condition and results in stable p-type. Especially, the (Mn, N)-codoped ZnO with 2:1 ratio has lower formation energy and higher p-type stability. Furthermore, the results of magnetic analysis also show that the (Mn, N)-codoped ZnO system with 2:1 ratio has higher total magnetic moment than 1:1 and 1:2. A significant ferromagnetic coupling raised by strong p-d interaction between Mn 3d and N 2p in the Mn-N-Mn complex is responsible for these results. However, high N doping ratio is not beneficial to the enhancement of ferromagnetism and p-type stability.