The legalization of opium trade refers to the formal acceptance and regulation of the opium market, allowing for its production, distribution, and sale under government oversight. This process became prominent during the 19th century, especially following conflicts such as the Second Opium War, where treaties like the Treaty of Tianjin established legal frameworks for opium trade in China, fundamentally altering its socio-economic landscape.