To determine the prevalence of diaphragmatic dysfunction diagnosed by M-mode ultrasonography (vertical excursion <10 mm or paradoxic movements) in medical intensive care unit patients and to assess the influence of diaphragmatic dysfunction on weaning outcome. Prospective, observational study. Twenty-eight-bed medical intensive care unit in a university-affiliated hospital. Eighty-eight consecutive patients in the medical intensive care unit who required mechanical ventilation over 48 hrs and met the criteria for a spontaneous breathing trial were assessed. Patients with a history of diaphragmatic or neuromuscular disease or evidence of pneumothorax or pneumomediastinum were excluded. During spontaneous breathing trial, each hemidiaphragm was evaluated by M-mode ultrasonography using the liver and spleen as windows with the patient supine. Rapid shallow breathing index was simultaneously calculated at the bedside. The prevalence of ultrasonographic diaphragmatic dysfunction among the eligible 82 patients was 29% (n = 24). Patients with diaphragmatic dysfunction had longer weaning time (401 [range, 226-612] hrs vs. 90 [range, 24-309] hrs, p < .01) and total ventilation time (576 [range, 374-850] hrs vs. 203 [range, 109-408] hrs, p < .01) than patients without diaphragmatic dysfunction. Patients with diaphragmatic dysfunction also had higher rates of primary (20 of 24 vs. 34 of 58, p < .01) and secondary (ten of 20 vs. ten of 46, p = .01) weaning failures than patients without diaphragmatic dysfunction. The area under the receiver operating characteristics curve of ultrasonographic criteria in predicting weaning failure was similar to that of rapid shallow breathing index. Using M-mode ultrasonography, diaphragmatic dysfunction was found in a substantial number of medical intensive care unit patients without histories of diaphragmatic disease. Patients with such diaphragmatic dysfunction showed frequent early and delayed weaning failures. Ultrasonography of the diaphragm may be useful in identifying patients at high risk of difficulty weaning.