The formation of an occlusive thrombus in the blood vessel is the main culprit for numerous life-threatening cardiovascular diseases that represent the leading cause of morbidity and mortality worldwide. Herein, we develop a polymer nanoplatform that integrates long-wavelength second near-infrared (NIR-II) photoacoustic imaging-based thrombosis detection and antithrombotic activity. We design and synthesize a semiconducting homopolymer with strong absorption in the NIR-II region and molecular motion that boosts photothermal conversion and photoacoustic signal. We dope the homopolymer with a thermosensitive nitric oxide donor to formulate a nanoplatform, on which a fibrin-specific ligand is functionalized to ensure selective thrombus targeting. We show that with strong NIR-II light harvesting capability, bright photoacoustic signal and active thrombus accumulation ability, the NIR-II photoacoustic nanoprobes are able to sensitively and selectively delineate thrombi. We find that the nanoplatform also displays rapid and efficient blood clot removal activity with nearly complete blood flow restoration in both carotid thrombosis models and low extremity arterial thrombosis models under NIR-II light trigger by integrating a thrombus-localized photothermal effect and on-demand nitric oxide release. This nanoplatform offers a versatile approach for the diagnosis and treatment of life-threatening diseases caused by various thrombotic disorders.© 2023. The Author(s).