Decoding specific cognitive states from brain activity constitutes a major goal of neuroscience. Previous studies of brain-state classification have focused largely on decoding brief, discrete events and have required the timing of these events to be known. To date, methods for decoding more continuous and purely subject-driven cognitive states have not been available. Here, we demonstrate that free-streaming subject-driven cognitive states can be decoded using a novel whole-brain functional connectivity analysis. Ninety functional regions of interest (ROIs) were defined across 14 large-scale resting-state brain networks to generate a 3960 cell matrix reflecting whole-brain connectivity. We trained a classifier to identify specific patterns of whole-brain connectivity as subjects rested quietly, remembered the events of their day, subtracted numbers, or (silently) sang lyrics. In a leave-one-out cross-validation, the classifier identified these 4 cognitive states with 84% accuracy. More critically, the classifier achieved 85% accuracy when identifying these states in a second, independent cohort of subjects. Classification accuracy remained high with imaging runs as short as 30-60 s. At all temporal intervals assessed, the 90 functionally defined ROIs outperformed a set of 112 commonly used structural ROIs in classifying cognitive states. This approach should enable decoding a myriad of subject-driven cognitive states from brief imaging data samples.