Depression, anxiety and sleep disturbances are known problems in patients with breast cancer. The effect of melatonin as an antidepressant in humans with cancer has not been investigated. We investigated whether melatonin could lower the risk of depressive symptoms in women with breast cancer in a three-month period after surgery and assessed the effect of melatonin on subjective parameters: anxiety, sleep, general well-being, fatigue, pain and sleepiness. Randomized, double-blind, placebo-controlled trial undertaken from July 2011 to December 2012 at a department of breast surgery in Copenhagen, Denmark. Women, 30-75 years, undergoing surgery for breast cancer and without signs of depression on Major Depression Inventory (MDI) were included 1 week before surgery and received 6 mg oral melatonin or placebo for 3 months. The primary outcome was the incidence of depressive symptoms measured by MDI. The secondary outcomes were area under the curve (AUC) for the subjective parameters. 54 patients were randomized to melatonin (n = 28) or placebo (n = 26) and 11 withdrew from the study (10 placebo group and 1 melatonin group, P = 0.002). The risk of developing depressive symptoms was significantly lower with melatonin than with placebo (3 [11 %] of 27 vs. 9 [45 %] of 20; relative risk 0.25 [95 % CI 0.077-0.80]), giving a NNT of 3.0 [95 % CI 1.7-11.0]. No significant differences were found between AUC for the subjective parameters. No differences in side effects were found (P = 0.78). Melatonin significantly reduced the risk of depressive symptoms in women with breast cancer during a three-month period after surgery.