Pulmonary dysfunction after stroke is increasingly gaining attention from clinical and rehabilitation specialists. However, owing to cognitive and motor dysfunction in patients with stroke, determining the pulmonary function of these patients remains challenging. The present study aimed to devise a simple method for an early evaluation of pulmonary dysfunction in patients with stroke. Overall, 41 patients with stroke in the recovery period (stroke group) and 22 matched healthy controls (control group) were included in the study. We first collected data regarding baseline characteristics for all participants. Furthermore, the participants with stroke were examined using additional scales, such as the National Institutes of Health Stroke Scale (NIHSS), Fugl-Meyer assessment scale (FMA), and modified Barthel Index (MBI). Subsequently, we examined the participants with simple pulmonary function detection and diaphragm ultrasound (B-mode). Ultrasound indices calculated were as follows: the thickness of the diaphragm under the position of functional residual capacity (TdiFRC), the thickness of the diaphragm under the position of forced vital capacity (TdiFVC), thickness fraction, and diaphragmatic mobility. Finally, we compared and analyzed all data to identify group differences, the correlation between pulmonary function and diaphragmatic ultrasound indices, and the correlation between pulmonary function and assessment scale scores in patients with stroke, respectively. Compared with the control group, patients in the stroke group exhibited lower values for indices of pulmonary and diaphragmatic function (p < 0.001), except for TdiFRC (p > 0.05). The majority of the patients with stroke had restrictive ventilatory dysfunction, as indicated by a significantly higher incidence ratio (36 in 41 patients) than that in the control group (0 in 22 patients) (p < 0.001). Moreover, significant correlations were found between pulmonary function and diaphragmatic ultrasound indices (p < 0.05), with the strongest correlation between TdiFVC and pulmonary indices. In the stroke group, pulmonary function indices were negatively correlated with the NIHSS scores (p < 0.001) and positively correlated with the FMA scores (p < 0.001). No (p > 0.05) or weak (p < 0.05) correlation was found between pulmonary function indices and the MBI scores. We found that patients with stroke had pulmonary dysfunction even in the recovery period. Diaphragmatic ultrasound can be used as a simple and effective tool for detecting pulmonary dysfunction in patients with stroke, with TdiFVC being the most effective index.