We report a density functional theory study of ZnO cluster doped with Eu and Mg along with native point defects using the generalized gradient approximation including the Hubbard parameter. The Zn atomic positions are found to be energetically more favorable doping sites than O. The Eu has a lower formation energy than Zn and O vacancies, helps in lowering the formation energy of point defects and induces spin polarization. Mg is less favorable dopant energetically and is not inducing any magnetism in the cluster. Presence of Eu and point defects along with Mg can help in sustaining spin polarization, implying that transition metal and rare earth dopant is a favorable combination to invoke desirable properties in ZnO based materials. Eu–Eu doping pair prefers ferromagnetic orientation and a spin flip is induced by Eu in the Eu–Mg configuration. Further, Eu doping increases the value of static refractive index and optical absorption in the UV region compared to the undoped ZnO cluster.