Deep brain stimulation (DBS) is a powerful tool for the treatment of circuitopathy-related neurological and psychiatric diseases and disorders such as Parkinson’s disease and obsessive-compulsive disorder, as well as a critical research tool for perturbing neural circuits and exploring neuroprostheses. Electrically-mediated DBS, however, is limited by the spread of stimulus currents into tissue unrelated to disease course and treatment, potentially causing undesirable patient side effects. In this work, we utilize infrared neural stimulation (INS), an optical neuromodulation technique that uses near to mid-infrared light to drive graded excitatory and inhibitory responses in nerves and neurons, to facilitate an optical and spatially constrained DBS paradigm. INS has been shown to provide spatially constrained responses in cortical neurons and, unlike other optical techniques, does not require genetic modification of the neural target. We show that INS produces graded, biophysically relevant single-unit responses with robust information transfer in rat thalamocortical circuits. Importantly, we show that cortical spread of activation from thalamic INS produces more spatially constrained response profiles than conventional electrical stimulation. Owing to observed spatial precision of INS, we used deep reinforcement learning for closed-loop control of thalamocortical circuits, creating real-time representations of stimulus-response dynamics while driving cortical neurons to precise firing patterns. Our data suggest that INS can serve as a targeted and dynamic stimulation paradigm for both open and closed-loop DBS.