Musculoskeletal pain is a common cause of work absence, and early intervention is advocated to prevent the adverse health and economic consequences of longer-term absence. This cluster randomised controlled trial investigated the effect of introducing a vocational advice service into primary care to provide occupational support. Six general practices were randomised; patients were eligible if they were consulting their general practitioner with musculoskeletal pain and were employed and struggling at work or absent from work <6 months. Practices in the intervention arm could refer patients to a vocational advisor embedded within the practice providing a case-managed stepwise intervention addressing obstacles to working. The primary outcome was number of days off work, over 4 months. Participants in the intervention arm (n = 158) had fewer days work absence compared with the control arm (n = 180) (mean 9.3 [SD 21·7] vs 14·4 [SD 27·7]) days, incidence rate ratio 0·51 (95% confidence interval 0·26, 0·99), P = 0·048). The net societal benefit of the intervention compared with best care was £733: £748 gain (work absence) vs £15 loss (health care costs). The addition of a vocational advice service to best current primary care for patients consulting with musculoskeletal pain led to reduced absence and cost savings for society. If a similar early intervention to the one tested in this trial was implemented widely, it could potentially reduce days absent over 12 months by 16%, equating to an overall societal cost saving of approximately £500 million (US $6 billion) and requiring an investment of only £10 million.