The combination of diagnostics and therapeutics is growing rapidly in cancer treatment. Here, using upconversion nanoparticles coated with chitosan conjugated with a targeting molecule and loaded with indocyanine green (ICG), an excitation-selectable nanoprobe with highly integrated functionalities, including the emission of visible and near-infrared (NIR) light, strong optical absorption in the NIR region and high photostability was developed. After injected in mice, the nanoprobes targeted to the tumor vascular system. NIR lasers (980 and 808 nm) were then selectively applied to the mice.The results show that, the emitted upconversion fluorescence and NIR fluorescence can be used in a complementary manner for high signal/noise ratio and sensitive tumor imaging for more precise tumor localization; Highly effective photothermal therapy can be realized using 808 nm laser irradiation. The upconversion fluorescence at 654 nm is useful for monitoring treatment effect during thermal therapy. In summary, using the nanoprobes, outstanding therapeutic efficacy could be realized and the nanofabrication strategy would highlight the promise of upconversion nanoparticles in cancer theranostics.