An In2O3/ZnO nanocomposite was synthesized by co-precipitation and applied in the photocatalytic degradation of cationic and anionic dyes. The nanocomposite was characterized by X-ray diffractometry (XRD), Raman spectroscopy, X-ray photoelectron spectrometry (XPS), scanning electron microscopy (SEM), high-resolution transmission electron microscopy (HRTEM), energy dispersive X-ray spectrometry (EDS), surface area analysis and UV–visible diffuse reflectance spectrometry (UV–Vis DRS). The XRD, Raman and XPS analyses revealed that the nanocomposite was composed of two phases (In2O3 and ZnO). SEM images showed agglomerations of In2O3 and ZnO, and TEM images confirmed the adhesion of In2O3 nanoparticles to the surface of ZnO. The specific surface area of the nanocomposite increased from 5.86 to 8.41 m2/g with increments of In2O3 content. The optical bandgap energies of ZnO and In2O3 powders were 3.12 and 2.90 eV, respectively. The best photocatalyst was 2%In2O3/ZnO nanocomposite and the optimal dosage was 150 mg. Under UV irradiation, 92.17, 55.54 and 38.61% of MB, RhB and MO, respectively, were degraded over the 2%In2O3/ZnO nanocomposite. Since the point of zero charge of 2%In2O3/ZnO was about 6.6, MB and RhB were more completely degraded under basic conditions while MO was more completely degraded under acidic conditions. The possible charge transfer mechanism for photocatalytic degradation over the 2%In2O3/ZnO nanocomposite was proposed based on an active species test. The results showed that h+, •OH and •O2- species were the reactive species responsible for the photocatalytic degradation of MB, RhB and MO. The In2O3/ZnO nanocomposite could remove the cationic dyes from water in a neutral condition and exhibited good stability.