Dye-sensitized solar cells (DSSCs) based on ZnO photoanodes have, despite extensive research, lagged behind cells based on TiO2, which is due to generally lower open-circuit voltages VOC and fill factors. Here, DSSCs have been prepared using Mg-doped ZnO (MZO) photoanodes based on nanoparticles, thin films or ZnO-MZO core-shell-type nanoparticles with varying Mg-concentration. The cells were studied in detailed photoelectrochemical and photoluminescence experiments. It was confirmed that VOC was significantly increased by Mg-doping. A clear influence of the Mg-concentration was also revealed on the transport and recombination of electrons in MZO, leading to a higher cell performance at low and lower cell performance at high concentrations of Mg in MZO. Nanoparticles with a pure ZnO core and an MZO shell offered a way to lower the influence of increased transport resistance in MZO and to capitalize on the significantly improved VOC.