Background Some Japanese patients with cancer pain have negative beliefs regarding opioid therapy. The Japanese version of the Barriers Questionnaire II (JBQ-II) determines barriers to cancer pain management. Few studies reported JBQ-II scores in Japan, and none focused on pharmacists. Accordingly, we aimed to explore the relationship between health care professionals’ knowledge of and willingness to use opioids, and their JBQ-II scores. Additionally, the variances in JBQ-II scores among nurses, hospital pharmacists, and pharmacy pharmacists were assessed. Methods This cross-sectional survey employed the JBQ-II for nurses and pharmacists in hospitals and pharmacies across Japan. Participants were requested to respond to the JBQ-II concerning their affiliation, knowledge of opioid analgesics, and willingness to utilize these drugs for medical practice. Results A total of 55 hospital pharmacists, 25 pharmacy pharmacists, and 24 nurses responded to the survey. The group-knowledgeable about medical use of narcotics had significantly lower total JBQ-II scores (25.43, standard deviation [SD]: 15.11) than those had by the group with insufficient knowledge (34.50, SD: 18.41). There was no statistically significant difference in total JBQ-II scores among those willing to use opioids medically. The total JBQ-II scores of hospital pharmacists, pharmacy pharmacists, and nurses were 31.00 (SD: 15.11), 33.96 (SD: 19.25), and 27.21 (SD: 15.56), respectively. However, the differences were not statistically significant. Conclusions Health care professionals in Japan with knowledge about opioids for medical purposes had a significantly lower total JBQ-II score than those with insufficient knowledge. Thus, health care professionals’ knowledge plays a crucial role in reducing barriers to using narcotic drugs.