Context. In end-of-life care, rehabilitation for patients with cancer is considered to be an important means for improving patients' quality of death and dying. Objectives. To determine whether the provision of rehabilitation for patients with cancer in palliative care units is associated with the achievement of a good death. Methods. This study involved a cross-sectional, anonymous, and self-report questionnaire survey of families of patients with cancer who died in palliative care units in Japan. We evaluated the short version of Good Death Inventory (GDI) on a seven-point scale. A logistic regression model was used to calculate the propensity score. Covariates included in this model were survey year, patients' characteristics, and families' characteristics. The associations between rehabilitation and GDI were tested using trend tests after propensity score matching adjustment. Results. Of the 1965 family caregivers who received the questionnaires, available data were obtained from 1008 respondents (51.2%). Among them, 285 (28.2%) cases received rehabilitation in palliative care units. There was no difference in total GDI score between the groups with and without rehabilitation. In exploratory analyses, patients receiving rehabilitation were significantly more likely to feel maintaining hope and pleasure (mean 4.50 [SE 0.10] vs. 4.05 [0.11], respectively; effect size [ES] 0.31; P = 0.003), good relationships with medical staff (mean 5.67 [SE 0.07] vs. 5.43 [0.09], respectively; ES 0.22; P = 0.035), and being respected as an individual (mean 6.08 [SE 0.06] vs. 5.90 [0.07], respectively; ES 0.19; P = 0.049) compared with patients not receiving rehabilitation. Conclusion. Rehabilitation in palliative care units may contribute to several domains of quality of death and dying, particularly maintaining hope and pleasure. Further research is needed to investigate whether palliative rehabilitation contributes to the achievement of a good death.