This study uses 26 in‐depth interviews conducted with people who use drugs (PWUD) who had sought care for chronic non‐cancer pain in public health facilities in Nigeria, to explore how drug consumption stigma constitutes patient legitimacy based on neoliberal ideals. It found drug consumption stigma to be salient and pervasive in PWUD health‐care encounters, operating through interpersonal interactions and institutionalised policies and practices to shape access to care. Crucially, stigma emerged through disciplinary opioid prescribing and dispensing practices that defined, categorised and marginalised PWUD based on how their drug consumption disrupted normative values of rationality and responsibility. Accounts additionally revealed disengagement from biomedical care and reliance on alternative pain management approaches (e.g. herbal remedies and illegal drugs), which show how structural positions shape the exercise of choice and agency in socially marginalised populations. In conclusion, the study considers the need to improve the health‐care experiences of PWUD as a strategy for enhancing health‐care engagement and improving health outcomes. It called for interventions to address the structural factors and interactional dynamics that influence stigma in health‐care settings as well as for a review of current guidelines and practices to improve access to opioids for chronic non‐cancer pain management.