Previous studies have demonstrated conflicting results regarding the effects of rehabilitation therapy on poststroke mortality. We aimed to investigate the association between rehabilitation therapy, including both inpatient and outpatient treatment, within the first 6 months after stroke and long-term all-cause mortality in patients with stroke using the Korean National Health Insurance System data. A total of 10 974 patients newly diagnosed with stroke using the International Classification of Diseases, Tenth Revision, codes (I60-I64) between 2003 and 2019 were enrolled and followed up for all-cause mortality until 2019. Follow-up for mortality began 6 months after the index event. Poststroke patients were categorized into 3 groups according to the frequency of rehabilitation therapy: no rehabilitation therapy, ≤40 sessions and >40 sessions. Cox proportional hazards models were used to assess the mortality risk according to rehabilitation therapy stratified by disability severity measured based on activities of daily living 6 months after stroke onset. Within 6 months after stroke, 6738 patients (61.4%) did not receive rehabilitation therapy, whereas 2122 (19.3%) received ≤40 sessions and 2114 (19.3%) received >40 sessions of rehabilitation therapy. Higher frequency of rehabilitation therapy was associated with significantly lower poststroke mortality in comparison to no rehabilitation therapy (hazard ratio [HR], 0.88 [95% CI, 0.79-0.99]), especially among individuals with severe disability after stroke (mild to moderate: HR, 1.02 [95% CI, 0.77-1.35]; severe: HR, 0.74 [95% CI, 0.62-0.87]). In the context of stroke type, higher frequency of rehabilitation therapy was associated with reduced mortality rates compared with no rehabilitation therapy only in patients with hemorrhagic stroke (ischemic: HR, 1.04 [95% CI, 0.91-1.18]; hemorrhagic: HR, 0.60 [95% CI, 0.49-0.74]). We found a positive association between rehabilitation therapy within 6 months after stroke onset and long-term mortality in patients with stroke. A higher frequency of rehabilitation therapy would be recommended for poststroke patients, especially those with hemorrhagic stroke and severe disability.