Magnesium oxide-coated tin oxide aggregates were prepared by a facile method. The aggregates consisted of nanoparticles which provided a large surface area of 74.27 m2g−1. Crack-free MgO-coated SnO2 porous films were prepared using electrophoretic deposition method. The causes which prevent the forming of cracks were also discussed. For the application in dye-sensitized solar cells, the electrophoresis conditions, such as the amount of MgO loading and deposition duration, were optimized. The MgO-coated SnO2 photoanodes showed excellent photovoltaic response in the long wavelength region between 550nm and 700nm The optimized MgO-coated SnO2 photoanodes showed an overall power conversion efficiency above 7.0% under AM 1.5G illumination (100 mW cm−2), having a short circuit current density, open circuit voltage, and fill factor of 20.0mAcm−2, 0.618V and 0.57, respectively.