Conducting polymers (CPs), especially polyaniline (PANI) based hybrid materials have emerged as very interesting materials for the adsorption of heavy metals and dyes from an aqueous environment due to their electrical transport properties, fascinating doping/de-doping chemistry and porous surface texture. Acid Blue 40 (AB40) is one of the common dyes present in the industrial effluents. We have performed a comparative study on the removal of AB40 from water through the application of PANI, magnetic oxide (Fe3O4) and their composites. Prior to this study, PANI and its composites with magnetic oxide were synthesized through our previously reported chemical oxidative synthesis route. The adsorption of AB40 on the synthesized materials was investigated with UV-Vis spectroscopy and resulting data were analyzed by fitting into Tempkin, Freundlich, Dubinin–Radushkevich (D–R) and Langmuir isotherm models. The Freundlich isotherm model fits more closely to the adsorptions data with R2 values of 0.933, 0.971 and 0.941 for Fe3O4, PANI and composites, respectively. The maximum adsorption capacity of Fe3O4, PANI and composites was, respectively, 130.5, 264.9 and 216.9 mg g−1. Comparatively good adsorption capability of PANI in the present case is attributed to electrostatic interactions and a greater number of H-bonding. Effect of pH of solution, temperature, initial concentration of AB40, contact time, ionic strength and dose of adsorbent were also investigated. Adsorption followed pseudo-second-order kinetics. The activation energy of adsorption of AB40 on Fe3O4, PANI and composites were 30.12, 22.09 and 26.13 kJmol−1 respectively. Enthalpy change, entropy change and Gibbs free energy changes are −6.077, −0.026 and −11.93 kJ mol−1 for adsorption of AB40 on Fe3O4. These values are −8.993, −0.032 and −19.87 kJ mol−1 for PANI and −10.62, −0.054 and −19.75 kJ mol−1 for adsorption of AB40 on PANI/Fe3O4 composites. The negative sign of entropy, enthalpy and Gibbs free energy changes indicate spontaneous and exothermic nature of adsorption.