Atrial fibrillation (AF) is one of the most frequent arrhythmias in clinical practice. Previous studies have reported the influence of AF on patients with heart failure (HF). The effect of AF on the non-HF critically ill patients in a medical intensive care unit (ICU) remains largely unclear. The study aimed to investigate the impact of AF presenting on ICU admission on the weaning outcome of non-HF mechanically ventilated patients in a medical ICU.A retrospective observational case–control study was conducted over a 1-year period in a medical ICU at Taipei Veterans General Hospital, a tertiary medical center in north Taiwan. Non-HF mechanically ventilated patients who were successful in their spontaneous breathing trial and underwent ventilator discontinuation were enrolled. The primary outcome measure was the ventilator status after the first episode of ventilator discontinuation.A total of 285 non-HF patients enrolled were divided into AF (n = 62) and non-AF (n = 223) groups. Compared with the non-AF patients, the AF patients were significantly associated with old age (P = 0.002), a higher rate of acute respiratory distress syndrome causing respiratory failure (P = 0.015), a higher percentage of sepsis before liberation from mechanical ventilation (MV) (P = 0.004), and a higher serum level of blood urea nitrogen on the day of liberation from MV (P = 0.003). Multivariate logistic regression analysis demonstrated that AF independently increased the risk of weaning failure [adjusted odds ratio (AOR), 3.268; 95% confidence interval (CI), 1.254–8.517; P = 0.015]. Furthermore, the AF patients were found to be independently associated with a high rate of ventilator dependence (log rank test, P = 0.026), prolonged total ventilator use (AOR, 1.979; 95% CI, 1.032–3.794; P = 0.040), increased length of ICU stay (AOR, 2.256; 95% CI, 1.049–4.849; P = 0.037), increased length of hospital stay (AOR, 2.921; 95% CI, 1.363–6.260; P = 0.006), and increased ICU mortality (AOR, 4.143; 95% CI, 1.381–12.424; P = 0.011).AF on ICU admission is an independent risk factor for weaning failure and significantly associated with poor hospital outcome in non-HF mechanically ventilated patients in a medical ICU.