BACKGROUND: One-quarter of all cancer deaths in Sweden occur in hospitals. If the place of death affects the quality of end-of-life (EOL) is largely unknown. METHODS: This population-based, retrospective study included all adults cancer deaths reported to the Swedish Register of Palliative Care in 2011-2013 (N = 41,729). Hospital deaths were compared to deaths occurring in general or specialised palliative care, or in nursing homes with respect to care quality indicators in the last week of life. Odds ratios (OR) with 95% confidence intervals (CI) were calculated with specialised palliative home care as reference. RESULTS: Preferred place of death was unknown for 63% of hospitalised patients and consistent with the actual place of death in 25% compared to 97% in palliative home care. Hospitalised patients were less likely to be informed when death was imminent (OR: 0.3; CI: 0.28-0.33) as were their families (OR: 0.51; CI: 0.46-0.57). Validated screening tools were less often used in hospitals for assessment of pain (OR: 0.32; CI: 0.30-0.34) or other symptoms (OR: 0.31; CI: 0.28-0.34) despite similar levels of EOL symptoms. Prescriptions of as needed drugs against anxiety (OR: 0.27; CI: 0.24-0.30), nausea (OR: 0.19; CI: 0.17-0.21), or pulmonary secretions (OR: 0.29; CI: 0.26-0.32) were less prevalent in hospitals. Bereavement support was offered after 57% of hospital deaths compared to 87-97% in palliative care units and 72% in nursing homes. CONCLUSIONS: Dying in hospital was associated with inferior end-of-life care quality among cancer patients in Sweden.