By, in effect, rendering pharmacokinetics an experimentally adjustable parameter, the ability to perform feedback-controlled dosing informed by high-frequency in vivo drug measurements would prove a powerful tool for both pharmacological research and clinical practice. Efforts to this end, however, have historically been thwarted by an inability to measure in vivo drug levels in real time and with sufficient convenience and temporal resolution. In response, we describe a closed-loop, feedback-controlled delivery system that uses drug level measurements provided by an in vivo electrochemical aptamer-based (E-AB) sensor to adjust dosing rates every 7 s. The resulting system supports the maintenance of either constant or predefined time-varying plasma drug concentration profiles in live rats over many hours. For researchers, the resultant high-precision control over drug plasma concentrations provides an unprecedented opportunity to (1) map the relationships between pharmacokinetics and clinical outcomes, (2) eliminate inter- and intrasubject metabolic variation as a confounding experimental variable, (3) accurately simulate human pharmacokinetics in animal models, and (4) measure minute-to-minute changes in a drug's pharmacokinetic behavior in response to changing health status, diet, drug-drug interactions, or other intrinsic and external factors. In the clinic, feedback-controlled drug delivery would improve our ability to accurately maintain therapeutic drug levels in the face of large, often unpredictable intra- and interpatient metabolic variation. This, in turn, would improve the efficacy and safety of therapeutic intervention, particularly for the most gravely ill patients, for whom metabolic variability is highest and the margin for therapeutic error is smallest.