Understanding goals of care for terminally ill patients at the end of life is crucial to ensure that patients receive care consistent with their preferences. To investigate the patterns of goals of care among patient-caregiver dyads over the last years of the patient's life and the associations of the goals of care with patient-caregiver characteristics. This prospective cohort study of 210 patient-caregiver dyads involved surveys every 3 months from July 8, 2016, until the patient's death or February 28, 2022. Data from the last 2 years of the patients' lives were analyzed. Dyads, which comprised patients with stage IV solid cancer and their caregivers, were recruited from outpatient clinics at 2 major cancer centers in Singapore. Goals of care were examined via the tradeoffs between life extension and symptom management and between life extension and cost containment. The actor-partner interdependence framework was implemented using mixed-effects linear regressions. This study included 210 dyads (patients: mean [SD] age, 62.6 [10.5] years; 108 men [51.4%]; caregivers: mean [SD] age, 49.4 [14.6] years; 132 women [62.9%]). On average, 34% of patients (264 of 780 observations; range, 23%-42%) and 29% of caregivers (225 of 780 observations; range, 20%-43%) prioritized symptom management over life extension, whereas 24% of patients (190 of 780 observations; range, 18%-32%) and 19% of caregivers (148 of 780 observations; range, 8%-26%) prioritized life extension. Between cost containment and life extension, on average, 28% of patients (220 of 777 observations; range, 22%-38%) and 17% of caregivers (137 of 780 observations; range, 10%-25%) prioritized cost containment, whereas 26% of patients (199 of 777 observations; range, 18%-34%) and 35% of caregivers (271 of 780 observations; range, 25%-45%) prioritized life extension. Goals of care did not change as patients approached death. Patients prioritized symptom management if they experienced higher symptom burden (average marginal effect [SE], 0.04 [0.01]), worse spiritual well-being (average marginal effect [SE], -0.04 [0.01]), and accurate (vs inaccurate) prognostic awareness (average marginal effect [SE], 0.40 [0.18]) and if their caregivers reported accurate prognostic awareness (average marginal effect [SE], 0.53 [0.18]), lower impact of caregiving on finances (average marginal effect [SE], -0.28 [0.08]), and poorer caregiving self-esteem (average marginal effect [SE], -0.48 [0.16]). Compared with patients, caregivers expressed lower preferences for cost containment (average marginal effect [SE], -0.63 [0.09]). Patients prioritized cost containment if they were older (average marginal effect [SE], 0.03 [0.01]), had higher symptom burden (average marginal effect [SE], 0.04 [0.01]), had poorer spiritual well-being (average marginal effect [SE], -0.04 [0.01]), and their caregivers reported poorer caregiving self-esteem (average marginal effect [SE], -0.51 [0.16]) and more family support (average marginal effect [SE], -0.30 [0.14]). In this cohort study of patient-caregiver dyads, findings suggested the importance of interventions aimed at reducing discordance in goals of care between patients and caregivers and helping them develop realistic expectations to avoid costly, futile treatments.