The objective of this research is to investigate the effect of incorporation of titanium dioxide (TiO2) nanoparticles, single‐walled carbon nanotube (SWNT) and multi‐walled carbon nanotube (MWNT) in polyaniline (PAni) nanocomposites for heavy metals removal application. Nanocomposites of PAni/HA, PAni/HA/TiO2, PAni/HA/TiO2/SWNT and PAni/HA/TiO2/MWNT were synthesised using template free method and their chemical structures were examined by Fourier transform infra‐red (FTIR) Spectrophotometry and X‐ray Diffractometry (XRD). The surface morphology, thermal behavior and electrical conductivity were studied via scanning electron microscopy (SEM), thermogravimetry (TGA) analyses and resistivity meter, respectively. The incorporation of TiO2 nanoparticles in PAni nanocomposites improved the thermal stability but reduced the electrical conductivity of pristine PAni from 2.1 × 10−1 S/cm to 1.5 × 10−1 S/cm. The incorporation of SWNT in PAni nanocomposites improved the thermal stability and enhanced the electrical conductivity of PAni nanocomposites from 2.1 × 10−1 S/cm (pristine PAni) to 7.5 × 10−1 S/cm. The flame atomic absorption spectroscopy (FAAS) was used in the determination of the efficacy in heavy metals removal. It was found that the efficiency in heavy metals removal by PAni/HA/TiO2/SWNT had the ascending order of Pb2+ < Cd2+ < Cu2+ < Fe3+. PAni/HA/TiO2/MWNT showed the highest heavy metals removal efficiency at 94% for Fe3+ ions within 4 h of contact time due to its improved thermal stability and moderate conductivity of 3.5 × 10−1 S/cm. The PAni/HA/TiO2/MWNT showed desirable performance in heavy metals removal (Fe3+ ions) with desirable recyclability up to 7 cycles and enhanced selectivity toward Fe3+ ions with a high removal efficiency of 85% in the presence of other interfering cation ions.