A near-infrared (NIR) activated theranostic nanoplatform based on upconversion nanoparticles (UCNPs) is developed in order to overcome the hypoxia-associated resistance in photodynamic therapy by photo-release of NO upon NIR illumination.