AIM The purpose of this study was (1) to evaluate the effectiveness of a pain education programme to increase the satisfaction of patients with cancer with regard to pain management and (2) to examine how patient satisfaction with pain management mediates the barriers to using analgesics and analgesic adherence. BACKGROUND The patients' satisfaction with pain management is not merely an indicator, it is actually a contributor to medication adherence. However, very few studies investigate methods for improving patient satisfaction with pain management. DESIGN This study used an experimental and longitudinal design. METHODS A total of 61 patient-family pairs (n = 122) were randomly assigned to either experimental or control groups. The instruments included the American Pain Society outcome questionnaire, the Barriers Questionnaire-Taiwan form, self-reporting evaluations of analgesic adherence and the Pain Education Booklet. The experimental group (n = 31) participated in a pain education programme, while those in the control group (n = 30) did not. The two groups were compared using generalised estimation equations after the second and fourth weeks. A Sobel test was used to examine the mediating relationships among patient satisfaction with pain management, barriers to using analgesics and analgesic adherence. RESULTS The experimental group showed a significant improvement in the level of satisfaction they felt for physicians and nurses regarding pain management. For those in the experimental group, satisfaction with pain management was a significant mediator between barriers to using analgesics and analgesic adherence. CONCLUSIONS This research provides evidence supporting the effectiveness of a pain education programme for patients and their family members in increasing patient satisfaction with regard to the management of cancer pain. RELEVANCE TO CLINICAL PRACTICE It is important for health providers to consider patient satisfaction when attempting to improve adherence to pain management regimes in a clinical setting.