Background: A cough peak flow (CPF) of <60 L/min was significantly associated with increased risk of extubation failure after a successful spontaneous breathing trial (SBT). Passive cephalic excursion of the diaphragm (PCED), measured by ultrasonography during cough expiration, was reported to predict CPF in healthy adults. We hypothesized that PCED, diaphragm peak velocity, or both, during cough, as measured by ultrasonography, might predict CPF and extubation outcome in mechanically ventilated patients. This study attempted to identify associations of ultrasonographic indices of the diaphragm with simultaneously measured CPF and to investigate the predictive values of ultrasonographic indices for extubation outcomes after a successful SBT.Methods: Two hundred fifty-two (252) mechanically ventilated patients with a successful SBT were enrolled in the prospective cohort study. Right hemidiaphragm passive cephalic excursion and peak velocity were measured by ultrasonography during voluntary cough expiration with maximum effort. CPF was measured simultaneously with ultrasonographic measurements.Results: A multiple regression model adjusted for age and sex showed a significant association between PCED and CPF (P < 0.001, adjusted beta coefficient 11.4, 95% CI 8.88–14.0, adjusted R2 = 0.287) and between diaphragm peak velocity and CPF (P < 0.001, adjusted beta coefficient 1.71, 95% CI 1.91–2.24, adjusted R2 = 0.235). The areas under the curves of PCED, diaphragm peak velocity, and CPF for extubation failure were 0.791 (95% Cl 0.668–0.914), 0.587 (95% Cl 0.426–0.748), and 0.765 (95% Cl 0.609–0.922), respectively.Conclusions: PCED measured by ultrasonography significantly predicted CPF and extubation failure after a successful SBT.