Objective The objective of this analysis was to examine the use of 11 non-essential medications in actively dying patients. Methods This was a planned secondary analysis of data from the Best Practices for End-of-Life Care for Our Nation's Veterans trial, a multicentre implementation trial of an intervention to improve processes of end-of-life care in inpatient settings. Supported with an electronic comfort care decision support tool, intervention included training hospital staff to identify actively dying patients, communicate the prognosis to patients/ families and implement best practices of traditionally home-based hospice care. Data on medication use before and after intervention were derived from electronic medical records of 5476 deceased veterans. Results Five non-essential medications, clopidogrel, donepezil, glyburide, metformin and propoxyphene, were ordered in less than 5% of cases. More common were orders for simvastatin (15.8%/15.1%), calcium tablets (8.4%/7.9%), multivitamins (11.6%/10.8%), ferrous sulfate (9.1%/7.6%), diphenhydramine (7.2%/5.1%) and subcutaneous heparin (29.9%/27.5%). Significant decreases were found for donepezil (2.5%/1.3%; p=0.001), propoxyphene (0.8%/0.1%; p=0.001), metformin (0.8%/0.3%; p=0.007) and multivitamins (11.6%/10.8%; p=0.01). Orders for one or more non-essential medications were less likely to occur in association with palliative care consultation (adjusted OR (AOR)=0.64, p<0.001), do-not-resuscitate orders (AOR=0.66, p=0.001) and orders for death rattle medication (AOR=0.35, p<0.001). Patients who died in an intensive care unit were more likely to receive a non-essential medication (AOR=1.60, p=0.009), as were older patients (AOR=1.12 per 10 years, p=0.002). Conclusions Non-essential medications continue to be administered to actively dying patients. Discontinuation of these medications may be facilitated by interventions that enhance recognition and consideration of patients' actively dying status.