A nanocomposite for detection and treatment of a target of interest including tumor cells or pathogens includes at least one nanostructure, each nanostructure having a core and a shell surrounding the core; a reporter assembled on the shell of each nanostructure; and a layer of a treating agent and a targeting agent conjugated to the reporter. In use, the nanocomposite targets to the target of interest according to the targeting agent and releases the treating agent and the nanostructure therein for therapeutic treatment of the target of interest, and the target of interest transmits at least one signature responsive to the reporter for detection of the target of interest.