The challenge in photothermal therapy (PTT) is to develop biocompatible photothermal transducers that can absorb and convert near-infrared (NIR) light into heat with high efficiency. Herein, we report salt-induced aggregation of gold nanoparticles (GNPs) in biological media to form highly efficient and biocompatible NIR photothermal transducers for PTT and photothermal/photoacoustic (PT/PA) imaging of cancer. The GNP depots in situ formed by salt-induced aggregation of GNPs show strong NIR absorption induced by plasmonic coupling between adjacent GNPs and very high photothermal conversion efficiency (52%), enabling photothermal destruction of tumor cells. More interestingly, GNPs in situ aggregate in tumors to form GNP depots, enabling simultaneous PT/PA imaging and PTT of the tumors. These findings may provide a simple and effective way to develop a new class of intelligent and biocompatible NIR photothermal transducers with high efficiency for PT/PA imaging and PTT.