Patients with advanced-stage cancer are receiving increasingly aggressive medical care near death, despite growing concerns that this reflects poor-quality care.To assess the association of aggressive end-of-life care with bereaved family members' perceptions of the quality of end-of-life care and patients' goal attainment.Interviews with 1146 family members of Medicare patients with advanced-stage lung or colorectal cancer in the Cancer Care Outcomes Research and Surveillance study (a multiregional, prospective, observational study) who died by the end of 2011 (median, 144.5 days after death; interquartile range, 85.0-551.0 days).Claims-based quality measures of aggressive end-of-life care (ie, intensive care unit [ICU] admission or repeated hospitalizations or emergency department visits during the last month of life; chemotherapy ≤2 weeks of death; no hospice or ≤3 days of hospice services; and deaths occurring in the hospital).Family member-reported quality rating of "excellent" for end-of-life care. Secondary outcomes included patients' goal attainment (ie, end-of-life care congruent with patients' wishes and location of death occurred in preferred place).Of 1146 patients with cancer (median age, 76.0 years [interquartile range, 65.0-87.0 years]; 55.8% male), bereaved family members reported excellent end-of-life care for 51.3%. Family members reported excellent end-of-life care more often for patients who received hospice care for longer than 3 days (58.8% [352/599]) than those who did not receive hospice care or received 3 or fewer days (43.1% [236/547]) (adjusted difference, 16.5 percentage points [95% CI, 10.7 to 22.4 percentage points]). In contrast, family members of patients admitted to an ICU within 30 days of death reported excellent end-of-life care less often (45.0% [68/151]) than those who were not admitted to an ICU within 30 days of death (52.3% [520/995]) (adjusted difference, -9.4 percentage points [95% CI, -18.2 to -0.6 percentage points]). Similarly, family members of patients who died in the hospital reported excellent end-of-life care less often (42.2% [194/460]) than those who did not die in the hospital (57.4% [394/686]) (adjusted difference, -17.0 percentage points [95% CI, -22.9 to -11.1 percentage points]). Family members of patients who did not receive hospice care or received 3 or fewer days were less likely to report that patients died in their preferred location (40.0% [152/380]) than those who received hospice care for longer than 3 days (72.8% [287/394]) (adjusted difference, -34.4 percentage points [95% CI, -41.7 to -27.0 percentage points]).Among family members of older patients with fee-for service Medicare who died of lung or colorectal cancer, earlier hospice enrollment, avoidance of ICU admissions within 30 days of death, and death occurring outside the hospital were associated with perceptions of better end-of-life care. These findings are supportive of advance care planning consistent with the preferences of patients.