Preclinical measurements of drug exposure to specific organs and tissues is normally performed by destructive methods. Tissue-specific measurements are important, especially for drugs with intractable dose-limiting toxicities, such as doxorubicin-mediated cardiotoxicity. We developed a method to rapidly quantify doxorubicin exposure to tissues within living organisms using an implantable optical nanosensor that can be interrogated noninvasively following surgical implantation. The near-infrared fluorescence of single-walled carbon nanotubes functionalized with DNA was found to respond to doxorubicin via a large and uniform red-shift. We found this to be common to DNA-intercalating agents, including anthracycline compounds such as doxorubicin. Doxorubicin was measured in buffer and serum, intracellularly, and from single nanotubes on a surface. Doxorubicin adsorption to the DNA-suspended nanotubes did not displace DNA but bound irreversibly. We incorporated the nanosensors into an implantable membrane which allowed cumulative detection of doxorubicin exposure in vivo. On implanting the devices into different compartments, such as subcutaneously and within the peritoneal cavity, we achieved real-time, minimally invasive detection of doxorubicin injected into the peritoneal cavity, as well as compartment-specific measurements. We measured doxorubicin translocation across the peritoneal membrane in vivo. Robust, minimally invasive pharmacokinetic measurements in vivo suggest the suitability of this technology for preclinical drug discovery applications.