ZnO and Er-doped ZnO with different molar ratios of Er/Zn were prepared using the homogeneous precipitation method. The photocatalysts prepared were characterized using scanning electron microscopy, transmission electron microscopy, X-ray diffraction (XRD), UV-vis spectroscopy, and photoluminescence spectroscopy. The results showed that the Er-doped ZnO displayed characteristic wurtzite-type peaks in the XRD spectra. The Er-doped ZnO absorbed much more light than ZnO in the ultraviolet region. And the doping of Er into ZnO enhanced the intensity of the fluorescence emission. The degradation of methylene blue (MB) solution demonstrated that the photocatalytic activity of ZnO was significantly improved with Er doping.