End-of-life care is costly, and decedents often experience overtreatment or low-quality care. Noninvasive ventilation (NIV) may be a palliative approach to avoid invasive mechanical ventilation (IMV) among select patients who are hospitalized at the end of life. To examine the trends in NIV and IMV use among decedents with a hospitalization in the last 30 days of life. This population-based cohort study used a 20% random sample of Medicare fee-for-service beneficiaries who had an acute care hospitalization in the last 30 days of life and died between January 1, 2000, and December 31, 2017. Sociodemographic, diagnosis, and comorbidity data were obtained from Medicare claims data. Data analysis was performed from September 2019 to July 2020. Use of NIV or IMV. Validated International Classification of Diseases, Ninth Revision, Clinical Modification or International Statistical Classification of Diseases, Tenth Revision, Clinical Modification procedure codes were reviewed to identify use of NIV, IMV, both NIV and IMV, or none. Four subcohorts of Medicare beneficiaries were identified using primary admitting diagnosis codes (chronic obstructive pulmonary disease [COPD], congested heart failure [CHF], cancer, and dementia). Measures of end-of-life care included in-hospital death (acute care setting), hospice enrollment at death, and hospice enrollment in the last 3 days of life. Random-effects logistic regression examined NIV and IMV use adjusted for sociodemographic characteristics, admitting diagnosis, and comorbidities. A total of 2 470 435 Medicare beneficiaries (1 353 798 women [54.8%]; mean [SD] age, 82.2 [8.2] years) were hospitalized within 30 days of death. Compared with 2000, the adjusted odds ratio (AOR) for the increase in NIV use was 2.63 (95% CI, 2.46-2.82; % receipt: 0.8% vs 2.0%) for 2005 and 11.84 (95% CI, 11.11-12.61; % receipt: 0.8% vs 7.1%) for 2017. Compared with 2000, the AOR for the increase in IMV use was 1.04 (95% CI, 1.02-1.06; % receipt: 15.0% vs 15.2%) for 2005 and 1.63 (95% CI, 1.59-1.66; % receipt: 15.0% vs 18.2%) for 2017. In subanalyses comparing 2017 with 2000, similar trends found increased NIV among patients with CHF (% receipt: 1.4% vs 14.2%; AOR, 14.14 [95% CI, 11.77-16.98]) and COPD (% receipt: 2.7% vs 14.5%; AOR, 8.22 [95% CI, 6.42-10.52]), with reciprocal stabilization in IMV use among patients with CHF (% receipt: 11.1% vs 7.8%; AOR, 1.07 [95% CI, 0.95-1.19]) and COPD (% receipt: 17.4% vs 13.2%; AOR, 1.03 [95% CI, 0.88-1.21]). The AOR for increased NIV use was 10.82 (95% CI, 8.16-14.34; % receipt: 0.4% vs 3.5%) among decedents with cancer and 9.62 (95% CI, 7.61-12.15; % receipt: 0.6% vs 5.2%) among decedents with dementia. The AOR for increased IMV use was 1.40 (95% CI, 1.26-1.55; % receipt: 6.2% vs 7.6%) among decedents with cancer and 1.28 (95% CI, 1.17-1.41; % receipt: 5.7% vs 6.2%) among decedents with dementia. Among decedents with NIV vs IMV use, lower rates of in-hospital death (50.3% [95% CI, 49.3%-51.3%] vs 76.7% [95% CI, 75.9%-77.5%]) and hospice enrollment in the last 3 days of life (57.7% [95% CI, 56.2%-59.3%] vs 63.0% [95% CI, 60.9%-65.1%]) were observed along with higher rates of hospice enrollment (41.3% [95% CI, 40.4%-42.3%] vs 20.0% [95% CI, 19.2%-20.7%]). This study found that the use of NIV rapidly increased from 2000 through 2017 among Medicare beneficiaries at the end of life, especially among persons with cancer and dementia. The findings suggest that trials to evaluate the outcomes of NIV are warranted to inform discussions about the goals of this therapy between clinicians and patients and their health care proxies.