We used real-time functional magnetic resonance imaging (fMRI) to determine which regions of the human brain have a role in vigilance as measured by reaction time (RT) to variably timed stimuli. We first identified brain regions where activation before stimulus presentation predicted RT. Slower RT was preceded by greater activation in the default-mode network, including lateral parietal, precuneus, and medial prefrontal cortices; faster RT was preceded by greater activation in the supplementary motor area (SMA). We examined the roles of these brain regions in vigilance by triggering trials based on brain states defined by blood oxygenation level-dependent activation measured using real-time fMRI. When activation of relevant neural systems indicated either a good brain state (increased activation of SMA) or a bad brain state (increased activation of lateral parietal cortex and precuneus) for performance, a target was presented and RT was measured. RTs on trials triggered by a good brain state were significantly faster than RTs on trials triggered by a bad brain state. Thus human performance was controlled by monitoring brain states that indicated high or low vigilance. These findings identify neural systems that have a role in vigilance and provide direct evidence that the default-mode network has a role in human performance. The ability to control and enhance human behavior based on brain state may have broad implications.