Introduction It is unclear whether advance care planning (ACP) undertaken with patients living in the community can improve patient care and avoid unwanted interventions and hospital admissions. We have designed a randomised controlled trial (RCT) to examine if ACP undertaken with patients with advanced illnesses attending hospital outpatient clinics can reduce unplanned hospital admissions and improve patient and caregiver well-being. Methods and analysis Pragmatic RCT involving patients from subspecialty outpatient clinics at five clinical sites in Sydney, Australia. Participants will be ≥18 years screened as potentially having palliative care needs and at risk of dying in 6-12 months. The patients will be randomised to intervention or control group. Intervention group will undertake ACP discussions facilitated by a trained health professional. The control group will receive written information on ACP, representing the current standard of care. The primary outcome is the number of unplanned hospital admissions at the 6-month follow-up. Secondary outcomes include: (i) patient's health-related quality-of-life and quality of chronic disease care; (ii) caregiver's health-related quality-of-life and caregiver burden and (iii) other health outcomes including ambulance usage, emergency department presentations, hospital admissions, resuscitation attempts, intensive care unit admissions, deaths, documentation of patient wishes in patient records and audit of ACP discussions and documents. The staff's self-reported attitudes and knowledge of ACP will also be measured. The data will be collected using self-report questionnaires, hospital records audit, audit of ACP documentation and data linkage analysis. Semistructured interviews and focus group discussions with patients, caregivers and healthcare professionals will explore the acceptability and feasibility of the intervention. Ethics and dissemination Approved by South-East Sydney Local Health District Human Research Ethics Committee and NSW Population and Health Services Research Ethics Committee. Results will be disseminated via conference presentations, journal publications, seminars and invited talks.