The present invention discloses a preparation technique of composite nanodots based on carbon nanodots, and their use in the field of fluorescent imaging, wherein, the main components of the composition are carbon nanodots, which are material with superior biocompatibility characteristics, and supporting component is methylene blue, and particle diameter range is 100-500 nanometers, and the zeta potential is −35 to 10 millivolts. The above said techniques for preparation of composite nanodots are safe, quick and simple, low cost, and easy to perform for industrialized production. Composite carbon nanodots have good biocompatibility and safety, high fluorescence imaging sensitivity, and they are promising in gaining wider use in the fields of biomedical imaging, targeting diagnosis and therapy, drug screening and optimization, and in vivo labelling and tracing, and have potential value in personalized medicine.