Abstract A multifunctional nanocomposite (UCMP-NDs) was constructed by combining NaGdF4:Yb,Er upconversion magnetic nanoparticles (UCMPs) and nanodiamonds (NDs) for dual-mode imaging and drug delivery. In this nanocomposite, nanodiamonds are used as drug carrier, and NaGdF4:Yb,Er nanoparticles act as dual-modal imaging agents for upconversion fluorescence and magnetic resonance imaging (MRI). When irradiated by 980 nm near-infrared light, the UCMP-NDs uptaken by cells show green emission, indicating its promising potential for fluorescence imaging. T1-weighted MRI of the nanocomposite in aqueous solutions reveals that the contrast brightening increases with the concentration of Gd3+ component. In addition, the anticancer drug doxorubicin (Dox) can be absorbed onto the nanocomposites and released in a pH-sensitive pattern. The nanocomposites show low systematic toxicity and high antitumor therapeutic efficacy. In vitro cell cytotoxicity tests on cancer cells verify that the Dox-loaded UCMP-NDs have comparable cytotoxicity with free Dox at the same of Dox concentration. Therefore, the developed multifunctional nanocomposites provide promising applications in oncotherapy by integrating cancer diagnosis and collaborative therapy.