Patients suffering from cancer and human immunodeficiency virus (HIV) disease at a teaching hospital were found to have poorly controlled pain. Many were prescribed inappropriate analgesia. A palliative care service was established to provide symptom control for patients and education for staff. Educational materials were developed, didactic teaching organized, and one-to-one education by case discussion provided to improve patient management. A repeat survey to evaluate the service showed an increase in the use of appropriate opioids, such as morphine and diamorphine, and a decrease in the use of buprenorphine and papaveretum, which are less suitable for use in chronic cancer pain. The acceptability of the guidelines and rapid availability of a palliative care opinion has improved analgesic prescribing.