It is a great challenge to design a drug delivery system with a controlled manner, especially one triggered by an exclusive endogenous disease marker and with an easily tracked release process. Herein, we developed a drug delivery platform of carbon dots which were connected to a stem-loop molecular beacon loaded with doxorubicin and polyethylene glycol modified folic acid. Such a platform enables one to release drugs on demand under the stimuli of endogenous microRNA-21, and turn on the fluorescence of carbon dots and doxorubicin, which allows one to monitor the drug release process. The intracellular experiment indicated that folic acid could mediate endocytosis of the nanocarrier, and the overexpressed endogenous microRNA-21 served as a unique key to unlock the drug nanocarrier by competitive hybridization with the molecular beacon, which finally resulted in fluorescence recovery and realized a chemotherapeutic effect within human breast cancer cells. The nanocarrier may have potential application in personalized treatment of different cancer subtypes in which the corresponding miRNAs are overexpressed.