ZnO nanoparticles doped with up to 5 at of Co and Mn were prepared using a co-precipitation method. The location of dopant ions and the effect of doping on the photocatalytic activity were investigated. The crystal structure of nanoparticles and local atomic arrangements around dopant ions were analyzed by X-ray absorption spectroscopy. The results showed that the Co ions substituted the Zn ions in the ZnO wurtzite phase structure and induced lattice shrinkage, while Mn ions were not completely incorporated in the crystal lattice. The photocatalytic activity under simulated sunlight was characterized by the decomposition of Rhodamine B dye molecules. It was revealed that Co-doping strongly reduced the photocatalytic activity but Mn-doping showed a weaker effect on the reduction of the photoactivity.