Background: Delirium in critically ill patients is associated with poor clinical outcomes. Neuroinflammation might be an important mechanism in the pathogenesis of delirium, and since simvastatin has anti-inflammatory properties it might reduce delirium. We aimed to establish whether early treatment with simvastatin would decrease the time that survivors of critical illness spent in delirium or coma. Methods:We undertook this randomised, double-blind, placebo-controlled trial in a general adult intensive care unit (ICU) in Watford General Hospital (Watford, UK). We enrolled critically ill patients (≥18 years) needing mechanical ventilation within 72 h of admission. We randomly assigned patients (1:1 ratio) to receive either simvastatin 80 mg or placebo daily for up to a maximum of 28 days, irrespective of coma or delirium status. We assessed delirium using the Confusion Assessment Method for the ICU (CAM-ICU). The primary outcome was number of days alive and was assessed as delirium-free and coma-free in the first 14 days after being randomly allocated to receive treatment or placebo. ICU clinical and research staff and patients were masked to treatment. We did intention-to-treat analyses with no extrapolation. This trial is registered with the International Standard Randomised Controlled Trial Registry, number ISRCTN89079989. Findings: Between Feb 1, 2013, and July 29, 2016, 142 patients were randomly assigned to receive simvastatin (n=71) or placebo (n=71), and were included in the final analysis. The mean number of days alive without delirium and without coma at day 14 did not differ significantly between the two groups (5·7 days [SD 5·1] with simvastatin and 6·1 days [5·2] with placebo; mean difference 0·4 days, 95% CI –1·3 to 2·1; p=0·66). The most common adverse event was an elevated creatine kinase concentration to more than ten times the upper limit of normal (eight [11%] in the simvastatin group vs three [4%] in the placebo group p=0·208). No patient had a serious adverse event related to the study drug. Interpretation: These results do not support the hypothesis that simvastatin modifies duration of delirium and coma in critically ill patients.