The goal of the present study was to determine whether pre-hospital 25-hydroxyvitamin D (25(OH)D) levels are associated with the risk of hospital-acquired new-onset delirium (HANOD). We performed a retrospective cohort study of 4508 adult inpatients at two teaching hospitals in Boston from 1993 to 2006. All patients had 25(OH)D levels measured before hospital admission. The main outcome measure was HANOD, defined as the onset of delirium during an acute care hospitalisation. Patients with a history of delirium or dementia, or those with a diagnosis of delirium or dementia upon acute care hospitalisation were excluded from the analysis. To test the association of pre-hospital 25(OH)D levels with HANOD, we constructed a multivariable logistic regression model to adjust for clinically relevant covariates. Among our patient cohort, the mean 25(OH)D level was 22 (sd 13) ng/ml and approximately 4 % of patients met the criteria for HANOD. Following adjustment for age, sex, race (non-white v. white), patient type (medical v. surgical) and Deyo–Charlson Index, patients with 25(OH)D levels < 10, 10–19·9 and 20–29·9 ng/ml had higher odds of HANOD than patients with 25(OH)D levels ≥ 30 ng/ml: OR 2·15 (95 % CI 1·32, 3·50), OR 1·54 (95 % CI 0·98, 2·43) and OR 1·23 (95 % CI, 0·76, 1·99), respectively. These data support the rationale for randomised, controlled trials to test the role of vitamin D supplementation in the prevention of HANOD.