This paper presents a 3.3×3.2 mm(2) system-on-chip (SoC) fabricated in AMS 0.35 μm 2P/4M CMOS for closed-loop regulation of brain dopamine. The SoC uniquely integrates neurochemical sensing, on-the-fly chemometrics, and feedback-controlled electrical stimulation to realize a "neurochemostat" by maintaining brain levels of electrically evoked dopamine between two user-set thresholds. The SoC incorporates a 90 μW, custom-designed, digital signal processing (DSP) unit for real-time processing of neurochemical data obtained by 400 V/s fast-scan cyclic voltammetry (FSCV) with a carbon-fiber microelectrode (CFM). Specifically, the DSP unit executes a chemometrics algorithm based upon principal component regression (PCR) to resolve in real time electrically evoked brain dopamine levels from pH change and CFM background-current drift, two common interferents encountered using FSCV with a CFM in vivo. Further, the DSP unit directly links the chemically resolved dopamine levels to the activation of the electrical microstimulator in on-off-keying (OOK) fashion. Measured results from benchtop testing, flow injection analysis (FIA), and biological experiments with an anesthetized rat are presented.