Photothermal therapy (PTT) at present, following the temperature definition for conventional thermal therapy, usually keeps the temperature of lesions at 42–45 °C or even higher. Such high temperature kills cancer cells but also increases the damage of normal tissues near lesions through heat conduction and thus brings about more side effects and inhibits therapeutic accuracy. Here we use temperature-feedback upconversion nanoparticle combined with photothermal material for real-time monitoring of microscopic temperature in PTT. We observe that microscopic temperature of photothermal material upon illumination is high enough to kill cancer cells when the temperature of lesions is still low enough to prevent damage to normal tissue. On the basis of the above phenomenon, we further realize high spatial resolution photothermal ablation of labelled tumour with minimal damage to normal tissues in vivo. Our work points to a method for investigating photothermal properties at nanoscale, and for the development of new generation of PTT strategy.