Objective. To probe into the influence of dexmedetomidine (DEX) on diaphragm function and postoperative outcomes of mechanically ventilated patients in the intensive care unit (ICU). Methods. 84 patients with mechanical ventilation (MV) in the ICU of our hospital were selected as the research participants, including 38 patients in the control group (CG) sedated with midazolam (MZ) and 46 patients in the research group (RG) with DEX sedation. Ramsay sedation score, visual analogue scale (VAS), and restlessness score (RS) were used to evaluate their state before sedation (T0), as well as 2 h (T1), 6 h (T2), and 24 h (T3) after sedation, and the alterations of mean arterial pressure (MAP) and heart rate (HR) were recorded. Serum cortisol (Cor), adrenocorticotropic hormone (ACTH), superoxide dismutase (SOD), malondialdehyde (MDA), interleukin- (IL-) 1β, IL-6, and tumor necrosis factor-α (TNF-α) were measured before and 24 h after sedation. The end-inspiratory diaphragm thickness (DTei) and end-expiratory diaphragm thickness (DTee) were measured within 2 h after the initiation of MV and 5 min after the spontaneous breathing test (SBT), and the diaphragm thickening fraction (DTF) was calculated. Finally, the ventilator weaning, MV time, and the incidence of adverse reactions (ADs) of the two groups were counted. Results. T0 and T3 witnessed no distinct difference in Ramsay, VAS, and RS scores between the two arms (
P
>
0.05
), but at T1 and T2, RG had better sedation state and lower VAS and RS scores than CG (
P
<
0.05
), with more stable vital signs (
P
<
0.05
). After sedation, the contents of oxidative stress and inflammatory factors in RG were lower, while DTee, DTei, and DTF were higher, versus CG (
P
<
0.05
). Moreover, RG presented higher success rate of first ventilator weaning, less MV time, and lower incidence of ADs than CG (
P
<
0.05
). Conclusions. DEX is effective in mechanically ventilated patients in the ICU, which can protect patients against diaphragm function damage, improve the success rate of ventilator weaning, and benefit the postoperative outcome, with excellent and rapid sedation effect and less stress damage to patients.