Our capacity to store information in working memory might be determined by the degree to which only relevant information is remembered. The question remains as to how this selection of relevant items to be remembered is accomplished. Here we show that activity in the prefrontal cortex and basal ganglia preceded the filtering of irrelevant information and that activity, particularly in the globus pallidus, predicted the extent to which only relevant information is stored. The preceding frontal and basal ganglia activity were also associated with inter-individual differences in working memory capacity. These findings reveal a mechanism by which frontal and basal ganglia activity exerts attentional control over access to working memory storage in the parietal cortex in humans, and makes an important contribution to inter-individual differences in working memory capacity.