Background: The use of electroconvulsive therapy (ECT) is limited by concerns about its cognitive adverse effects. Preliminary evidence suggests that administering the glutamate antagonist ketamine with ECT might alleviate cognitive adverse effects and accelerate symptomatic improvement; we tested this in a randomised trial of low-dose ketamine. Methods: In this multicentre, randomised, parallel-group study in 11 ECT suites serving inpatient and outpatient care settings in seven National Health Service trusts in the North of England, we recruited severely depressed patients, who were diagnosed as having unipolar or bipolar depressive episodes defined as moderate or severe by DSM-IV criteria, aged at least 18 years, and were able and willing to provide written consent to participate in the study. Patients were randomly assigned (1:1) to ketamine (0·5 mg/kg intravenous bolus) or saline adjunctive to the anaesthetic for the duration of their ECT course. Patients and assessment and ECT treatment teams were masked to treatment allocation, although anaesthetists administering the study medication were not. We analysed the primary outcome, Hopkins Verbal Learning Test-Revised delayed verbal recall (HVLT-R-DR) after four ECT treatments, using a Gaussian repeated measures model in all patients receiving the first ECT treatment. In the same population, safety was assessed by adverse effect monitoring. This trial was registered with International Standard Randomised Controlled Trial Number, number ISRCTN14689382. Findings: Between early December, 2012, and mid-June, 2015, 628 patients were screened for eligibility, of whom 79 were randomly assigned to treatment (40 in the ketamine group vs 39 in the saline group). Ketamine (mean 5·17, SD 2·92), when compared with saline (5·54, 3·42), had no benefit on the primary outcome (HVLT-R-DR; difference in means -0·43 [95% CI -1·73 to 0·87]). 15 (45%) of 33 ketamine-treated patients compared with 10 (27%) of 37 patients receiving saline experienced at least one adverse event which included two (6%) of 33 patients who had ketamine-attributable transient psychological effects. Psychiatric adverse events were the most common in both groups (six [27%] of 22 adverse events in the ketamine group vs seven [54%] of 13 in the saline group). Interpretation: No evidence of benefit for ketamine was found although the sample size used was small; however, the results excluded greater than a small to moderate benefit with 95% confidence. The results do not support the use of adjunctive low-dose ketamine in routine ECT treatment. Funding: National Institute for Health Research (NIHR) Efficacy and Mechanism Evaluation (EME) programme, an MRC and NIHR partnership.