Knowledge of drug concentrations in the brains of behaving subjects remains constrained on a number of dimensions, including poor temporal resolution and lack of real-time data. Here, however, we demonstrate the ability of electrochemical aptamer-based sensors to support seconds-resolved, real-time measurements of drug concentrations in the brains of freely moving rats. Specifically, using such sensors, we achieve <4 μM limits of detection and 10-s resolution in the measurement of procaine in the brains of freely moving rats, permitting the determination of the pharmacokinetics and concentration-behavior relations of the drug with high precision for individual subjects. In parallel, we have used closed-loop feedback-controlled drug delivery to hold intracranial procaine levels constant (±10%) for >1.5 hours. These results demonstrate the utility of such sensors in (i) the determination of the site-specific, seconds-resolved neuropharmacokinetics, (ii) enabling the study of individual subject neuropharmacokinetics and concentration-response relations, and (iii) performing high-precision control over intracranial drug levels.