Targeted chemotherapy and magnetic resonance imaging of cancer cells in vitro has been achieved using a smart multifunctional nanostructure (SMN) constructed from a porous hollow magnetite nanoparticle (PHMNP), a heterobifunctional PEG ligand, and an aptamer. The PHMNPs were prepared through a three-step reaction and loaded with the anticancer drug doxorubicin while being functionalized with PEG ligands. Targeting aptamers were then introduced by reaction with the PEG ligands. The pores of the PHMNPs are stable at physiological pH, but they are subject to acid etching. Specific binding and uptake of the SMN to the target cancer cells induced by aptamers was observed. In addition, multiple aptamers on the surface of one single SMN led to enhanced binding and uptake to target cancer cells due to the multivalent effect. Upon reaching the lysosomes of target cancer cells through receptor-mediated endocytosis, the relatively low lysosomal pH level resulted in corrosion of the PHMNP pores, facilitating the release of doxorubicin to kill the target cancer cells. In addition, the potential of using SMN for magnetic resonance imaging was also investigated.