Online gambling emerged in the 1990s in the midst of a process of market liberalisation. Here, scholars have argued that the gambling industry actively seeks state regulation to authorise and legitimate its activities. Why then, since the emergence of the online gambling industry, have trade associations continually sought to develop responsible gambling codes of conduct? In this paper, I address this puzzle by documenting and tracing the development and deployment of responsible gambling codes of conduct by trade associations from the emergence of the online gambling industry in the early 1990s and through processes of increased market liberalisation at the national level and market integration at the European Union level. I argue that online gambling trade associations deploy responsible gambling codes of conduct at particular moments of opportunity to shape their members’ external legal and regulatory environment and to reproduce and embed a particular understanding of how gambling-related risks should be regulated.