Background: Depression, anxiety, fatigue, and impaired wellbeing are common, important, and closely related in advanced cancer. We aimed to identify the effects of an established antidepressant on these symptoms and survival in patients with advanced cancer who did not have major depression as assessed by clinicians. Methods: Between July, 2001, and February, 2006, 189 patients with advanced cancer were randomly assigned sertraline 50 mg (n=95), or placebo (n=94), once per day. The primary outcome was depression as assessed by the Centre for Epidemiologic Studies Depression scale (CES-D); the main secondary outcomes were: anxiety as assessed by Hospital Anxiety and Depression Scales (HADS-A); overall quality of life and fatigue as assessed by Functional Assessment of Cancer Therapy General and Fatigue scales (FACT-G and FACT-F, respectively); and clinicians' ratings of quality of life by use of Spizter's Quality of Life Index (SQLI). Multiple measures were used for corroboration of the most important outcomes. Primary analyses were done by intention to treat and were based on scale scores at 4 weeks and 8 weeks. The benefits of sertraline compared with placebo are expressed on a range from +100 (ie, maximum benefit) to -100 (ie, maximum harm); a difference of 10 was deemed clinically significant. This clinical trial is registered at Current Controlled Trials website http://www.controlled-trials.com/ISRCTN72466475. Findings: Sertraline had no significant effect (scale, benefit over placebo [95% CI]) on depression (CES-D 0·4 [-2·6 to 3·4]), anxiety (HADS-A 2·0 [-1·5 to 5·5]), fatigue (FACT-F 0·3 [-4·3 to 4·9]), overall quality of life (FACT-G 1·7 [-1·3 to 4·7]), or clinicians' ratings (SQLI 2·0 [-2·5 to 6·5]), and the 95% CI ruled out a clinically significant benefit for all main outcomes. Sertraline was discontinued more often and earlier than was placebo (hazard ratio 1·46 [1·03-2·06], p=0·03). Recruitment was stopped after the first planned interim analysis in February 2006 (n=150) showed that survival was longer in patients assigned placebo than in patients assigned sertraline (unadjusted hazard ratio 1·60 [95% CI 1·04-2·45], log-rank p=0·04; adjusted hazard ratio 1·62 [1·06-2·41], Cox model p=0·02). However, at the final analysis in July 2006 of all patients (n=189) and with longer follow-up, survival did not differ significantly between the treatment groups (unadjusted hazard ratio 1·35 [0·95-1·91], log-rank p=0·09; adjusted hazard ratio 1·27 [0·87-1·84], Cox model p=0·20). The trial was closed because it had ruled out a significant benefit of sertraline. Interpretation: Sertraline did not improve symptoms, wellbeing, or survival in patients with advanced cancer who do not have major depression, and should be reserved for those with a proven indication.