Connectivity between the nucleus accumbens (NAc) and ventromedial prefrontal cortex (vmPFC) and reward learning independently predict the transition from acute to chronic back pain (CBP). However, how these predictors are related remains unclear. Using functional magnetic resonance imaging, we investigate NAc- and vmPFC-dependent reward learning in 50 patients with subacute back pain (SABP) and follow them over 6 months. Additionally, we compare 29 patients with CBP and 29 pain-free controls to characterize mechanisms of reward learning in the chronic stage. We find that the learning-related updating of the value of reinforcement (prediction error) in the NAc predicts the transition to chronicity. In CBP, compared with controls, vmPFC responses to this prediction error signal are decreased, but increased during a discriminative stimulus. Distinct processes of reward learning in the vmPFC and NAc characterize the development and maintenance of CBP. These could be targeted for the prevention and treatment of chronic pain.