OBJECTIVES: Delirium is a serious medical condition with increased incidence in at-risk surgical populations. We sought to determine if melatonin use reduces the incidence of delirium in individuals undergoing major cardiac surgery. DESIGN: Randomized double-blind placebo-controlled clinical trial (two arms, 1:1 allocation, parallel design). SETTING: The trial took place in two metropolitan hospitals (public tertiary and private) in Perth, Western Australia. PARTICIPANTS: We recruited 210 adults aged 50 years or older who were due to undergo coronary artery bypass grafting or valve replacement surgery. INTERVENTION: Participants were randomly assigned (1:1) to 7 days of treatment with melatonin 3 mg at night or matching placebo, starting 2 days before the surgery. MEASUREMENTS: The primary outcome of interest was incident delirium within 7 days of surgery as assessed via daily clinical assessment that included the Confusion Assessment Method. Secondary outcomes of interest included duration and severity of delirium, length of hospital stay, cognitive function, and mood and anxiety symptoms at discharge and 3 months after the surgery. RESULTS: The groups were well balanced for demographic and clinical parameters. Forty-two participants developed delirium, but it was evenly distributed between the groups (melatonin 21/98, 21.4%; placebo 21/104, 20.2%; adjusted odds ratio [OR] =.78; 95% confidence interval [CI] =.35-1.75). The median duration of delirium was 3 (interquartile range [IQR] = 2-4) and 2 (IQR = 1-3) days for people treated with melatonin and placebo, respectively (z = −1.03; P =.304). A similar proportion of participants experienced severe episodes of delirium in each group (melatonin 9/21, 42.9% vs placebo 6/21, 28.6%; χ2 =.93; P =.334; adjusted OR = 1.98; 95% CI =.40-9.78). The groups did not differ in terms of length of stay, mood, anxiety, and cognitive performance. CONCLUSION: The findings of this randomized double-blind placebo-controlled trial do not support the prophylactic use of melatonin to prevent delirium after major cardiac surgery.