In this paper, we report on the photodegradation of methylene blue (MB) using Er2O3-coated silicon nanowires as photocatalyst under UV and visible light irradiation. The silicon nanowires (SiNWs) were synthesized by Ag-assisted electroless etching on which Er was electrodeposited by Chronoamperometric method. The samples were analyzed by scanning electron microscopy (SEM), energy dispersive X-ray spectroscopy (EDX) and X-ray diffraction (XRD). The results showed that Er2O3 was uniformly formed on silicon nanowires. The samples showed a high efficiency for the MB photodegradation especially, under UV light irradiation where a degradation rate of 100% was obtained after 90 min.