a b s t r a c tAn economical photocatalyst, waste-based PANI/NiFe 2 O 4 composite was successfully synthesized from aniline wastewater, electroplating wastewater and pickling waste liquor. The obtained photocatalysts were characterized by XRD, TEM, XPS, FTIR spectra and VSM techniques. The material exhibited good magnetic property with high saturation magnetization (41.09 emu g -1 ). After 3 h visible light irradiation, the hydrogen evolution capacity of waste-based PANI, NiFe 2 O 4 and PANI/ NiFe 2 O 4 composite were 1.28, 5.10 and 8.94 mmol g -1 respectively. Among these materials, waste-based PANI/NiFe 2 O 4 exhibited the optimum photocatalytic activity. Besides, waste-based PANI/NiFe 2 O 4 also displayed higher photocatalytic hydrogen production than pure PANI/NiFe 2 O 4 that has been studied before. Waste-based NiFe 2 O 4 was responsible for the enhanced photocatalytic activity. The reaction mechanism of waste-based NiFe 2 O 4 was researched in two parts: the effect of Cr 3+ and organic impurities for structure formation of waste-based NiFe 2 O 4 during in-situ polymerization process. The synthesized waste-based NiFe 2 O 4 exhibited larger specific surface area and smaller grain structure than pure NiFe 2 O 4 , which facilitated the photocatalytic activity. Preparation of photocatalyst from wastewater could not only reduce environmental pollution but also produce new material for other application. The proposed preparation method of waste-based photocatalyst composite had great potential in the field of wastewater treatment and photocatalysis.