Modified chitosan exhibits pH-responsive structural transformation. Chitosan-based core-shell nanospheres can release DOX triggered by lowered pH. The NIR-fluorescent nanospheres can be monitored in real time by NIR imaging. DOX release from nanospheres can be activated in tumor cells for cancer therapy.