Polyaniline PANi/zinc oxide ZnO nanocomposite has been chemically synthesized by using formic acid. ZnO/PANi nanocomposites containing different weight content of ZnO nanoparticles (10, 20, and 30 wt%). ZnO nanoparticles were prepared by co-precipitation method. Characteristics such as structural, morphological and absorption of the prepared nanocomposites were studied by XRD, FTIR, SEM and UV–vis spectra. X-ray diffraction of zinc oxide nanoparticles confirmed formation of hexagonal wurtzite crystalline structure, also the substituted zinc oxide nanoparticles in different percentage to semi-crystalline polyaniline indicating nearly the same crystalline structure of ZnO/PANi nanocomposites. The Fourier Transform Infrared Spectra (FT-IR) of ZnO nanoparticles, PANi and their composites have been analyzed in the frequency range between 400–4000 cm− 1. The characteristic FT-IR peaks of ZnO nanoparticles show shifts to lower wave numbers in all composites. These observed effects may be due to conjugation and some chemical interactions between ZnO nanoparticles and PANI molecular chain. The results confirmed that the PANI successfully grown on surface of ZnO nanoparticles. The ZnO nanoparticles, PANI and ZnO/PANi nanocomposites were further applied to remove methylene orange dye, the effect of pH, initial dye concertation and ZnO nanoparticles dose were investigated via a batch experimental. According to the results, that the hybrid composite of ZnO/PANi increased the photo degradation of methylene orange dye molecules in aqueous solution compared with parent materials. Maximum removal efficiencies at optimum conditions were higher than 97% at pH 11, concentration of dye:10 mg/l, time equal 40 min and dose 0.1 g of PANi/ZnO.