Brain–computer interfaces (BCIs) enable humans or animals to communicate or control external devices without muscle activity using electric brain signals. The BCI used here is based on self-regulation of slow cortical potentials (SCPs), a skill that most people and paralyzed patients can acquire with training periods of several hours up to months. The neurophysiological mechanisms and anatomical sources of SCPs and other event-related brain potentials have been described but the neural mechanisms underlying the self-regulation skill for the use of a BCI are unknown. To uncover the relevant areas of brain activation during regulation of SCPs, the BCI was combined with functional magnetic resonance imaging. The electroencephalogram was recorded inside the magnetic resonance imaging scanner in 12 healthy participants who learned to regulate their SCP with feedback and reinforcement. The results demonstrate activation of specific brain areas during execution of the brain regulation skill allowing a person to activate an external device; a successful positive SCP shift compared with a negative shift was closely related to an increase of the blood oxygen level-dependent response in the basal ganglia. Successful negativity was related to an increased blood oxygen level-dependent response in the thalamus compared with successful positivity. These results may indicate learned regulation of a cortico-striatal-thalamic loop modulating local excitation thresholds of cortical assemblies. The data support the assumption that human subjects learn the regulation of cortical excitation thresholds of large neuronal assemblies as a prerequisite for direct brain communication using an SCP-driven BCI. This skill depends critically on an intact and flexible interaction between the cortico-basal ganglia-thalamic circuits.