Metal nitrides show excellent photothermal stability and conversion properties, which have the potential for photothermal therapy (PTT) for cancer. Photoacoustic imaging (PAI) is a new non-invasive and non-ionizing biomedical imaging method that can provide real-time guidance for precise cancer treatment. In this work, we develop polyvinylpyrrolidone-functionalized tantalum nitride nanoparticles (defined as TaN-PVP NPs) for PAI-guided PTT of cancer in the second near-infrared (NIR-II) window. The TaN-PVP NPs are obtained by ultrasonic crushing of massive tantalum nitride and further modification by PVP to obtain good dispersion in water. Due to their good absorbance in the NIR-II window, TaN-PVP NPs with good biocompatibility have obvious photothermal conversion performance, realizing efficient tumor elimination by PTT in the NIR-II window. Meanwhile, the excellent PAI and photothermal imaging (PTI) capabilities of TaN-PVP NPs are able to provide monitoring and guidance for the treatment process. These results indicate that TaN-PVP NPs are qualified for cancer photothermal theranostics.