A novel multifunctional envelope-type mesoporous silica nanoparticle (MEMSN) system combining the merits of pH-responsiveness, non-toxicity and biological specificity, is demonstrated for drug delivery and magnetic resonance imaging (MRI). This system is constructed by immobilizing acetals on the surface of mesoporous silica, and then coupling to ultra small lanthanide doped upconverting nanoparticle, which act as a gate keeper. The anticancer drug DOX is thus locked in the pores, and its burst release can be achieved under acidic environment on account of the hydrolyzation reactions of acetals. The nanogated drug release system is highly efficacious for cancer therapy both in vitro and in vivo. Importantly, the nanocomposite could be harmlessly metabolized and degraded into apparently non-toxic products within a few days. The nanoscale effect of the system allows for passive tumor targeting and increased tumor accumulation of the probes via the enhanced permeation and retention (EPR) effect, which is visualized by MRI in vivo. Therefore, such nanosystem should be of great significance in the future development of highly efficient and tumor targeted drug delivery vehicles for cancer chemotherapy.