AbstractCognitive control is the ability to withhold a default, prepotent response in favor of a more adaptive choice. Control deficits are common across mental disorders, including depression, anxiety, and addiction. Thus, a method for improving cognitive control could be broadly useful in disorders with few effective treatments. Here, we demonstrate closed-loop enhancement of one aspect of cognitive control by direct brain stimulation in humans. We stimulated internal capsule/striatum in participants undergoing intracranial epilepsy monitoring as they performed a cognitive control/conflict task. Stimulation enhanced performance, with the strongest effects from dorsal capsule/striatum stimulation. We then developed a framework to detect control lapses and stimulate in response. This closed-loop approach produced larger behavioral changes than open-loop stimulation, with a slight improvement in performance change per unit of energy delivered. Finally, we decoded task performance directly from activity on a small number of electrodes, using features compatible with existing closed-loop brain implants. Our findings are proof of concept for a new approach to treating severe mental disorders, based on directly remediating underlying cognitive deficits.