Deep brain stimulation (DBS) is a therapeutic option for intractable neurological and psychiatric disorders, including Parkinson's disease and major depression. Because of the heterogeneity of brain tissues where electrodes are placed, it has been challenging to elucidate the relevant target cell types or underlying mechanisms of DBS. We used optogenetics and solid-state optics to systematically drive or inhibit an array of distinct circuit elements in freely moving parkinsonian rodents and found that therapeutic effects within the subthalamic nucleus can be accounted for by direct selective stimulation of afferent axons projecting to this region. In addition to providing insight into DBS mechanisms, these results demonstrate an optical approach for dissection of disease circuitry and define the technological toolbox needed for systematic deconstruction of disease circuits by selectively controlling individual components.