Phototrigger-controlled drug-release devices (PDDs) can be conveniently manipulated by light to obtain on-demand release patterns, thereby affording an improved therapeutic efficacy. However, no example of the PDDs has been demonstrated beyond the cellular level to date. By loading 7-amino-coumarin derivative caged anticancer drug chlorambucil to yolk–shell structured nanocages possessing upconversion nanophosphors (UCNPs) as moveable core and silica as mesoporous shell, a near-infrared (NIR)-regulated PDD is successfully created. In vitro experiments demonstrate that drug release from the PDD could be triggered by continuous-wave 980 nm light in a controlled pattern. The PDD could be taken up by cancer cells and release the drug to kill cancer cells upon NIR irradiation. Further in vivo studies demonstrate that the PDD can effectively response the NIR stimuli in living tissue. This is the first example of successful NIR-regulated drug release in living animal model. Such achievement resolves the problem of low tissue penetration depth for traditional PDDs by adopting UCNPs as an NIR light switcher, which gives impetus to practical applications.