With the development of personalized medicine, the research of theranostic agents with good biocompatibility, stability, and targeting properties remains meaningful. Herein, we report a two-step process to construct heteropoly blue (HPB) doped polymer nanoparticles (HPB/P4VP-b-PEO NPs) with efficient near-infrared (NIR) light absorption and photothermal conversion efficiency of ∼23% to simultaneously perform photoacoustic imaging and photothermal therapy in vivo. After intravenous injection into the 4T1 xenograft model, in vivo photoacoustic imaging confirmed the targeted property of HPB/P4VP-b-PEO NPs due to the enhanced EPR effect. The photoacoustic signal in the tumor at 24 h p.i. was more than ∼10 times that of the pre-injection group. By virtue of their EPR effect, HPB/P4VP-b-PEO NPs achieved a good photothermal therapeutic efficacy in vivo.