For a study, researchers sought to describe the diaphragm function time course in mechanically ventilated septic and non-septic patients. Secondary analysis of 2 prospective observational studies of mechanically ventilated patients in which diaphragm function was measured twice: 24 hours after intubation and when patients were switched to pressure support mode, by measuring endotracheal pressure in response to bilateral anterior magnetic phrenic nerve stimulation (Ptr, stim). The difference between Ptr, stim obtained under pressure support mode and Ptr, stim measured 24 hours after intubation was used to determine diaphragm function. When the Sepsis-3 international guidelines were used, sepsis was defined. The right hemidiaphragm thickness was evaluated using ultrasound in a subset of individuals. A total of 92 patients were enrolled in the research. On intubation, 51 (55%) of the patients had sepsis. The most common reason for ventilation in septic patients was acute respiratory failure due to pneumonia (37/51;73%). Acute respiratory failure unrelated to pneumonia (16/41;39%), coma (13/41;32%), and cardiac arrest (6/41;15%) were the most common reasons for ventilation in non-septic patients. Ptr, stim was lower in septic patients than non-septic patients within 24 hours of intubation: 6.3 (4.9–8.7) cmH2O vs. 9.8 (7.0–14.2) cmH2O (P=0.004), respectively. Septic patients had a median (interquartile) length of mechanical ventilation of 4 (2–6) days, while non-septic patients had a median (interquartile) duration of 3 (2–4) days (P=0.073). The difference in Ptr, stim between the first and second measures was + 19% (13–61) in septic patients and -7% (40–12) in non-septic patients (P=0.005). End-expiratory diaphragm thickness was reduced in both septic and non-septic patients in the subgroup of patients who had ultrasonography measurements. Patients with a decline or no change in diaphragm function had a greater 28-day death rate. In comparison to non-septic patients, septic patients had a more severe but reversible reduced diaphragm function. Increased diaphragm function was linked to a higher chance of survival.