Photocross-linkable Au nanoparticles are prepared through surface decoration of photolabile diazirine moieties. Both in vitro and in vivo studies indicate that the light-triggered cross-linking can dramatically shift the surface plasmon resonance of Au nanoparticles to near-infrared regions, which in consequence remarkably enhances their efficacy for photothermal therapy and photoacoustic imaging of tumors in vivo.