Often times I hear that China didn't accept the Opium, since it was afraid that it might get too popular in their empire.
For the results, the humiliation and the transfer of Hong Kong is often discussed, but nobody talked about the drugs, something which China tried to block off.
So did China have a problem with Opium after it lost the war? If yes then how did they fix it?
If yes then how did they fix it?
Bold of you to assume...
To provide some context to this answer we need to discuss some historiography. A good summation of the orthodox view of opium as a major factor in the history of late 19th and early 20th century East Asia can be found in the introduction to Opium Regimes: China, Britain and Japan, 1839-1952 (2000), edited by Bob Tadashi Wakabayashi and Timothy Brook, and indeed the individual chapters look at individual case studies of opium's impact in various contexts. Incidentally, it's a very good collection of essays, well worth the read.
But the 00's saw a number of works published on the history of opium in China that might broadly be termed 'revisionist' in that they argued against the view that opium was in itself a crisis, or a cause of other crises. The most striking (and arguably polemical) work in this regard was Narcotic Culture: A History of Drugs in China (2004) by Frank Dikötter, Zhou Xun and Lars Laamann, which rather controversially argued for the existence of net benefits of opium, a point which rather muddied the waters of a more sensible postmodern critique about the ways in which we approach discourses of drug use in societies both past and present. Namely, that substances end up being imbued with agency that is stripped from their users (and indeed any individuals operating in connection with them), and that we tend to ignore contemporaneous discourses of narcotics, which may take a neutral or even positive tone, in favour of retrojecting later, critical perspectives. Zheng Yangwen's The Social Life of Opium in China (2005) sticks more to the discourse, culture and use patterns and avoids polemic, and so I personally think it's a better representative of the revisionist case. A few specific aspects were also targeted: Man-Houng Lin's China Upside-Down: Currency, Society, and Ideologies, 1808-1856 (2006) argued convincingly against opium being a root cause of economic crisis, and Harry Gelber in Opium, Soldiers and Evangelicals (2004) rather boldly argued that opium was peripheral to the Opium War (his more recent The Battle for Beijing (2016) argues the same for the Arrow (Second Opium) War.)
These revisionist perspectives have been very influential in recent treatments of the Opium War period for popular audiences – Julia Lovell's The Opium War (2011) draws heavily on Dikötter et al. at points, while Stephen Platt's Imperial Twilight (2018) draws on Zheng and Lin, and echoes Gelber's relative sidelining of opium as a cause of the war.
This preceding historiographical discussion exists to give context to what I'll be writing here, which will in many ways echo earlier answers of mine such as this one and this one. Namely, building on the postmodern approach taken by Dikötter et al. and especially by Zheng, that the notion of a drug 'problem' is one that exists in any given context because society conceives it into existence, and is not an innate 'problem' unless perceived as such. 'Was there significant opium consumption before/after the Opium War' is a distinct question with a distinct answer from 'was there an opium problem before/after the Opium War', because it is theoretically conceivable that you could have few people consuming opium but it being seen as a pernicious vice, or many people consuming opium and it being normalised and accepted. Because of this I'll be answering two questions: the question as phrased (was there a 'problem'?), and an implied question (what was the scale of opium consumption and how did the wars affect it?)
As the first of the two linked answers goes into, opium had been smoked in China since at least the 1660s, and there had been a steady trade in opium from India since the late 18th century, yet active anti-opium campaigning largely took place in the 1830s, and marked a rather sudden and ephemeral uptick in anti-opium sentiment. A more widespread and sustained condemnation of opium as a destructive substance on a societal level in China, the suppression of which would be a matter of political import, only really re-emerged some decades later in the 1880s and later, as domestic cultivation of opium poppy entered full swing. The anti-opium prohibitions that culminated in the Opium War in 1839 were the product of particular circumstances in the 1830s. While there would continue to be moral condemnations of (increasingly prevalent) opium use, only after the devastating Taiping War of 1851-64, a far bigger fish to fry than a few foreign drug smugglers, did the matter of opium return to Qing official discourse as a major source of concern. In the immediate aftermath of the Opium War, Qing policy was to avoid a recurrence of conflict by replacing belligerent officials in frontier areas with conciliatory ones, and agreeing to a number of disadvantageous trade deals (the early 'Unequal Treaties') as a form of security by disincentivising further military conflict, and in that general atmosphere of not rocking the boat, the Qing turned a blind eye to further issues on the opium front.
Yet the rise in opium imports was continuously going on in the background. As said earlier, there had been steady imports of exports from India to China since the late 18th century, and the major acceleration in exports that led to the Opium War commenced back in 1821. The first war in 1839-42 did lead to a sudden surge in growth of opium exports, but export growth dropped off quite dramatically after the Arrow War of 1856-60. I'm not sure which figures are more reliable, but I've taken the liberty of tabulating the figures from Lin's book and from Nick Robins' 2012 book on the East India Company for every five years from 1800 to 1900 (figures are in chests per year):
| Year | Lin | Robins |
|---|---|---|
| 1800 | 4570 | 4788 |
| 1805 | 3159 | 3358 |
| 1810 | 4593 | 4246 |
| 1815 | 3673 | 3872 |
| 1820 | 4186 | 3091 |
| 1825 | 12434 | 12639 |
| 1830 | 16257 | 22534 |
| 1835 | 21885 | 23983 |
| 1840 | 20619 | 23802 |
| 1845 | 39010 | 36942 |
| 1850 | 52925 | 51606 |
| 1855 | 78354 | 77379 |
| 1860 | 58681 | 75822 |
| 1865 | 77000 | 84491 |
| 1870 | 58000 | 88685 |
| 1875 | 63000 | 94745 |
| 1880 | 72000 | 105508 |
| 1885 | 67000 | 86579 |
| 1890 | 77000 | 85166 |
| 1895 | 62000 | 68838 |
| 1900 | 49000 | 67350 |
Lin's more conservative figures would suggest an overall stagnation in export growth after 1855, with annual exports hovering between just under 80,000 and just under 60,000 chests a year; Robins' more liberal figures nevertheless suggest a significant slowdown in 1855-80 compared to 1840-55. This, partly, is why I prefer not to generically refer to the 'Opium Wars' as effectively two iterations of the same thing. The First Opium War of 1839-42 was followed by a marked increase in the growth of opium imports over the following two decades; the Second Opium War of 1856-60 was not.
A major factor in the decline in British opium exports was in fact a growth in opium cultivation in China itself. Opium was an incredibly lucrative cash crop and so bankrolled a number of post-civil war recovery efforts such as in Yunnan, although Sichuan, a region relatively unscathed by the wars, would go on to produce the lion's share of opium in the empire. It was the massive increase in opium users after the emergence of domestic opium cultivation that prompted a sustained period of moral panic about opium which became particularly prevalent during the Republican period, but which had already had some purchase since at least the 1890s.
It was in this atmosphere of moral panic that the Qing committed to an anti-opium policy for the second time, having largely avoided broaching the issue in any serious way since 1842. By 1902 the Qing and British had made a provisional agreement to ban non-medical trade in opiates, but this was conditional on agreement from all other trading partners which would not come to fruition until 1907, and did not apply to domestic production. But the Qing went a step further in September 1906, when the imperial court issued an edict expressing its desire to eradicate both opium imports and domestic cultivation by 1916, including provisions to reduce the amount of land used for growing poppies by 10% a year. While the initial assessment by foreign powers was that the Qing imperial state was too weak to force the hands of the provinces, as the Qing's commitment to this course of action became clear over the following 14 months it increasingly began to be taken seriously. This led to a formal agreement between Britain and China, first put forward to the British Consul-General Sir John Jordan in November 1907 and signed in December, to reduce opium exports from India by a minimum of 10% every year until 1910 (when the deal would presumably be renewed if successful), as well as a doubling of the tariff on opium as a further discouragement. Further negotiations concerned opium dens in the Shanghai International Settlement, and the Hong Kong opium monopoly (which accounted for about a quarter of the colony's income). These were broadly successful, and by the time the 3 year agreement was up for renewal, British opium exports had fallen well under the set quota.