The Charlson comorbidity index (CCI) is widely used for control of confounding from comorbidities in epidemiological studies. International Classification of Diseases (ICD)-coded diagnoses from administrative hospital databases is potentially an efficient way of deriving CCI. However, no studies have evaluated its validity in infectious disease research. We aim to compare CCI derived from administrative data and medical record review in predicting mortality in patients with infections. We conducted a cross-sectional study on 199 inpatients. Correlation analyses were used to compare comorbidity scores from ICD-coded administrative databases and medical record review. Multivariable regression models were constructed and compared for discriminatory power for 30-day in-hospital mortality. Overall agreement was fair [weighted kappa 0·33, 95% confidence interval (CI) 0·23–0·43]. Kappa coefficient ranged from 0·17 (95% CI 0·01–0·36) for myocardial infarction to 0·85 (95% CI 0·59–1·00) for connective tissue disease. Administrative data-derived CCI was predictive of CCI ⩾5 from medical record review, controlling for age, gender, resident status, ward class, clinical speciality, illness severity, and infection source (C = 0·773). Using the multivariable model comprising age, gender, resident status, ward class, clinical speciality, illness severity, and infection source to predict 30-day in-hospital mortality, administrative data-derived CCI (C = 0·729) provided a similar C statistic as medical record review (C = 0·717, P = 0·8548). In conclusion, administrative data-derived CCI can be used for assessing comorbidities and confounding control in infectious disease research.