The subjective values of choice options can impact on behavior in two fundamentally different types of situations: first, when people explicitly base their actions on such values, and second, when values attract attention despite being irrelevant for current behavior. Here we show with functional magnetic resonance imaging (fMRI) that these two behavioral functions of values are encoded in distinct regions of the human brain. In the medial prefrontal cortex, value-related activity is enhanced when subjective value becomes choice-relevant, and the magnitude of this increase relates directly to the outcome and reliability of the value-based choice. In contrast, activity in the posterior cingulate cortex represents values similarly when they are relevant or irrelevant for the present choice, and the strength of this representation predicts attentional capture by choice-irrelevant values. Our results suggest that distinct components of the brain’s valuation network encode value in context-dependent manners that serve fundamentally different behavioral aims.