Existing evidence of an association between effort-reward imbalance (ERI) at work and musculoskeletal pain is limited, preventing reliable conclusions about the magnitude and direction of the relation. In a large longitudinal study, we examined whether the onset of ERI is associated with subsequent onset of musculoskeletal pain among those free of pain at baseline, and vice versa, whether onset of pain leads to onset of ERI. Data were from the Swedish Longitudinal Occupational Survey of Health (SLOSH) study. We used responses from 3 consecutive study phases to examine whether exposure onset between the first and second phases predicts onset of the outcome in the third phase (N = 4079). Effort-reward imbalance was assessed with a short form of the ERI model. Having neck-shoulder and low back pain affecting life to some degree in the past 3 months was also assessed in all study phases. As covariates, we included age, sex, marital status, occupational status, and physically strenuous work. In the adjusted models, onset of ERI was associated with onset of neck-shoulder pain (relative risk [RR] 1.51, 95% confidence interval [CI] 1.21-1.89) and low back pain (RR 1.21, 95% CI 0.97-1.50). The opposite was also observed, as onset of neck-shoulder pain increased the risk of subsequent onset of ERI (RR 1.36, 95% CI 1.05-1.74). Our findings suggest that when accounting for the temporal order, the associations between ERI and musculoskeletal pain that affects life are bidirectional, implying that interventions to both ERI and pain may be worthwhile to prevent a vicious cycle.