In recent years, several near-infrared light absorbing inorganic nanomaterials have been developed for photothermal therapy. However, their biological fate after injection limits their clinical utilization. In this work, we developed a novel polymeric near-infrared light absorbing material based on a biocompatible thermoresponsive nanogel that is semi-interpenetrated with polyaniline, a conjugated polymer with strong near-infrared absorbance. This polymeric nanocomposite generates heat after being irradiated by NIR light, thereby inducing a local hyperthermia that is used for photothermal cancer therapy in vitro and in vivo.