Obesity, defined by a body mass index (BMI) ≥ 30 kg/m2, is associated with higher mortality in the general population but shows a complex relationship with chronic diseases and critically illness. The aim of this study was to determine whether BMI predicted 30-day mortality (primary outcome) and intensive care unit (ICU) and hospital lengths of stay (LOS) (secondary outcome) in critically ill patients. This retrospective monocentric study encompassed adult patients admitted to the ICU of the Geneva University Hospitals between January 2010 and December 2022. They were categorized according to their BMI as underweight (<18.5 kg/m2), normal weight (18.5-24.9 kg/m2, reference category), overweight (25.0-29.9 kg/m2), obesity class I (30.0-34.9 kg/m2), class II (35.0-39.9) and class III (≥40.0 kg/m2). The association between BMI and outcomes was assessed by multivariate Cox Lasso (Least absolute shrinkage and selection operator) or linear Lasso regression models, adjusted for age, sex, Simplified Acute Physiology Score (SAPS) II, primary diagnosis (ICD-10 codes) and measurement time points. We included 5473 patients (34.2 % women), age 60 ± 17.6 years, SAPS II 49.6 ± 19.9, BMI 26.5 ± 6.0 kg/m2, admitted to the ICU mainly for trauma, cardio-vascular and infectious diseases. The 30-day mortality rate was 21.4 % for women and 22.1 % for men. In multivariate analyses, mortality risk, expressed as hazard ratio (HR), was lower in patients with a BMI of 35.0-39.9 kg/m2 (HR 0.72, p = 0.020) and higher in those with a BMI <18.5 kg/m2 (HR 1.44, p = 0.006) compared to normal weight. BMI categories in the overweight, obesity class I and class II range were all associated with longer ICU and hospital LOS (all p < 0.05). Patients with higher BMI, particularly with class II obesity, show a lower 30-day mortality in ICU settings, but a longer ICU and hospital LOS. This is likely a reflection of the obesity paradox and the complex role of body composition in critical illness outcomes. clinicaltrials.gov, identifier: NCT05834894.