Cognitive flexibility, the ability to appropriately adjust behavior in a changing environment, has been challenging to operationalize and validate in cognitive neuroscience studies. Here, we investigate neural activation and directed functional connectivity underlying cognitive flexibility using an fMRI-adapted version of the Flexible Item Selection Task (FIST) in adults (n = 32, ages 19–46 years). The fMRI-adapted FIST was reliable, showed comparable performance to the computer-based version of the task, and produced robust activation in frontoparietal, anterior cingulate, insular, and subcortical regions. During flexibility trials, participants directly engaged the left inferior frontal junction, which influenced activity in other cortical and subcortical regions. The strength of intrinsic functional connectivity between select brain regions was related to individual differences in performance on the FIST, but there was also significant individual variability in functional network topography supporting cognitive flexibility. Taken together, these results suggest that the FIST is a valid measure of cognitive flexibility, which relies on computations within a broad corticosubcortical network driven by inferior frontal junction engagement.