The microstructure, optical property and magnetism of nitrogen ion implanted single MgO crystals are studied. A parallel investigation is also performed in an iron ion implanted single MgO sample as a reference. Large structural, optical and magnetic differences are obtained between the nitrogen and iron implanted samples. Room temperature ferromagnetism with a fairly large coercivity field of 300 Oe (1 Oe=79.5775 A/m), a remanence of 38% and a slightly changed optical absorption is obtained in the sample implanted using nitrogen with a dose of 1×1018 ions/cm2. Transition metal contamination and defects induced magnetism can be excluded when compared with those of the iron ion implanted sample, and the nitrogen doping is considered to be the main origin of ferromagnetism.