Abstract Background As 40–60% of the patients with obsessive-compulsive disorder (OCD) do not adequately respond to the first-line treatment, finding an effective second-line treatment is required. Our aim was to assess the efficacy and safety of agomelatine (a selective melatonin receptor agonist and a 5-hydroxytryptamine (HT)2 C antagonist) augmentation of sertraline in the treatment of patients with moderate to severe OCD. Methods In this 12-week randomized, double-blinded, placebo-controlled, parallel-group clinical trial, 65 patients with moderate to severe OCD according to the Diagnostic and Statistical Manual of Mental Disorders-Fifth edition (DSM–5) criteria and a Yale-Brown obsessive compulsive scale (Y-BOCS) score of over 21, were included. They were assigned with sertraline (100 mg/day for the first 4 weeks and 200 mg/day for the next 8 weeks) and either agomelatine (25 mg/day) or placebo. The primary outcome was OCD symptoms measured by the Y-BOCS. Results Fifty patients (24 in agomelatine group and 26 in placebo group) completed the trial. The Y-BOCS scores in total (MD (95% CI) = 12.25 (11.00, 13.49) (P