The Opium War of 1839-1842
Why it happened
During the years leading up to the war, both China and neighboring Japan had closed their borders to Europeans in order to limit Christian proselytizing within their borders. Both countries considered it to be subversive of their indigenous cultures and religions, and it's tough to say that they were wrong, considering the fourteen year Taiping rebellion, which was based on a sort of bastardized version of Christianity, that was to take place starting in 1850. That disturbance being several years in the future, though, fear of subversion was the main reason for the closing of Chinese ports to Westerners. Trade was too profitable to curtail completely, though, so the Chinese allowed Europeans to trade only at one port, Canton, and only with thirteen houses of merchants, collectively known as the Hongs. Between these merchants and the British East India Company, who enjoyed a monopoly guaranteed by the government on the export of Chinese tea and silk, things were mutually agreeable for a long time, until the end of the eighteenth century.
The balance of trade had long been in China's favor. China, in a unique position inasmuch as it has been an especially self-sufficient nation over the centuries, had little to no need for British products, buying only limited amounts of wool and cotton from the British merchants. The merchants, however, exported tea to Britain by the boatload and silk by the bale. It was this imbalance which would eventually provide an excuse for everyone to kill each other.
After having been humiliated by the upstart Americans in the Revolutionary War, the British had been increasingly miserly about trade. The government got quite heavy-handed about this, incidentally causing the War of 1812 with the same type of strategy. With regard to the trade in Chinese tea bound for Britain, smugglers from the European continent were at an advantage over British tea importers because England charged a tax of 110% on incoming tea, providing ample impetus for industrious smugglers to get it to the English more cheaply. Noticing this fact, in 1784 a fellow named Pitt got a bill passed that reduced the tea duties to 10%, knowing that it would not only stimulate legal tea shipping and stamp out illegal tea, but that it would also give the English a reason to drink a lot of tea, a habit which endures to this day. The downside, though, was that the English had to find a way to pay for all the tea in silver, which was to Chinese copper coinage what all the gold in Fort Knox theoretically is to American paper money. The British looked to India for the answer and began to export Indian cotton and indigo dye to China in exchange for silver that they could use to buy Chinese tea. This worked alright until the Chinese inexplicably stopped importing Indian cotton and until a synthetic replacement for indigo, Prussian Blue, was found. The British then took care of the problem by becoming drug dealers.
Opium was a rather dangerous thing to be dealing with, as we know today, and it is especially dangerous when an almost unlimited supply is introduced. Before the nineteenth century, the British had dealt in small quantities with a high profit margin, but then growers from western India, outside really anyone's jurisdiction, began competing with the British for exports to China, forcing the East India Company's hand and making certain that large amounts would need to be sold in order to make a profit. Adding to the problem, the British really hadn't used it very extensively for recreational purposes before (although it had enjoyed limited use for centuries as a painkiller), so they were ignorant of its addictive qualities. The Chinese weren't, however, (especially since the preferred method of consumption in China was smoking--the most addictive method of consumption) and had outlawed its use and sale in 1729 and its import in 1796. The British had been importing the stuff since the East India Company inherited the Bengal Opium Monopoly in 1773, but its use had only skyrocketed in the nineteenth century as it came to be used more and more recreationally. This was problematic in mainland China, not only because of the addiction issue but also because the Chinese endured a concurrent silver shortage for which the silver drained off to pay for opium was blamed, although probably not rightly*, and in 1821 the Chinese government began to try to enforce its previously ignored anti-opium law. Governor-General Ruan Yuan ordered the opium vessels out of the river.
This was very problematic for Britain, whose economy depended on tea (bought with opium silver), the East India Company (one seventh of whose profits were from opium), and the four million pounds that the princes of India sent them every year (mostly silver for which opium had been exchanged). The first alarm of 1821 blew over after a while, since the British ships just moved downriver to Lintin Island and conducted business more or less normally, but it was followed by a second anti-opium movement in 1829. The British were confident that the Chinese government would probably just legalize the trade in order to control it, but the emperor instead rejected legalization and started making serious attempts on the ability of the British to trade drugs at Canton. At about the same time, the East India Company, who had been the primary British presence in the area, was chased out of its monopolistic trade by the aforementioned West Indian growers and by anti-monopolistic sentiment at home. This meant that the East India Company eventually became ineffectual and its political importance in China was greatly reduced, meaning that it fell to the British government to carry out British/Chinese relations functions in Canton as well as the overseeing of British citizens and protection of them from the rather sketchy Chinese legal system. Additionally, the British economy and British industrial merchants both provided powerful arguments in favor of Britain forcing China to open its ports to British goods. In general, the Chinese restrictions on trade and foreign contact were increasingly ignored by both the British and their customers, but the British were still pretty upset about the whole thing and the fact that their representatives were treated unequally by the Chinese imperial administration. They felt ignored, and gradually the British came to believe that an armed demonstration of their grievances would be the best way to bring them to the attention of China and thereby have them redressed.
Before that, though, a mission was sent to the Chinese government under one Lord Napier in order to establish normal communication between the two nations after the East India Company went under in 1833. Napier was told by the British government to be quiet and careful in seeing that no British citizens were mistreated and in looking into the possibility of the extension of trade to China outside of Canton. Napier was in command of some naval troops and was a representative of the British government, but the Chinese wanted some sort of proof of this before they let him outside of the Portugese-controlled port of Macao. Napier eluded Chinese authorities, however, and went straight to Canton, announcing his presence in a letter that was construed by the Chinese as being rather rude. They let him stay in Canton anyway, though, and even tried to engage in talks with him, although it wound up with everyone getting into a fight over chair placement. No kidding.
Napier was pretty mad about the chair thing, and called the Chinese Governor-General Deng Tingzhen a "presumptuous savage" before ordering his warships to move into the harbor in as threatening a way as possible. The Chinese in turn blockaded the British private holdings in Canton. Napier fortuitously picked that moment to die of "sudden illness," though, delaying the war. In 1835, a fellow member of the diplomatic mission, Charles Elliot, was appointed by his relative Lord Palmerston as the head of the mission. Elliot was much more conciliatory in his attitude to the Chinese, and thought that Napier had been a hotheaded fool to act in the way he had. He politely wrote a letter to the emperor and gave it to the Hong merchants to give the local officials. They responded with equal politeness, but Palmerston, getting wind of this, demanded that Elliot stop being so polite. When the Governor-General ordered a stop be put to the trade and the ships moved further downriver from Canton, Elliot agreed with the Chinese decision and wrote Britain that he might be obliged to intervene against the opium traders. Palmerston told him to shut up. The problem mounted as the British opium traders began to use increasingly reprehensible smuggling methods and even clashing with Chinese authorities militarily.
Everyone wanted to eliminate the opium trade at this point in favor of something less distasteful, and the Emperor was no exception. He got a guy named Lin Zexu, an Imperial Commissioner who had been responsible for using an iron fist to stomp out the opium problem further inland (with domestic opium) to go down to Canton to put a stop to the whole thing once and for all in 1839. At first, he tried to eliminate the trade as peacefully as possible so that the Triads (a sort of Chinese mafia who had anti-Manchu tendencies and therefore were no friend to the Manchu emperor) and the British would not gang up on the Chinese. Unfortunately, though, his distrust of Elliot and his ignorance of the general situation led him to do some rather ill-advised things. First, he tried to make the merchants at Lintin surrender the opium stored there to him. It was not theirs to give up, though, since it belonged to some merchants in India for whom they were holding it. Lin didn't have the firepower to force the surrender, though, so he took all the British in Canton and confined them to their warehouses on an island in the harbor. He wanted the British to turn over the opium dealers for execution, an action they would not allow, and he surrounded their factories with troops, effectively taking everyone hostage for the opium. Elliot, after six weeks of indecision, ordered that the drug be surrendered to the Chinese despite its ownership, whereupon the stores were burned. When word of this got to London, the English decided, after much debate, that they were going to have to make the Chinese compensate the merchants whose property they had siezed and burned.
The war itself
Before this issue could be settled, though, a Chinese peasant by the name of Lin Weihi was killed in a drunken brawl by the banks of the Pearl River. This caused Lin Zexu to demand the British turnover of the guilty party, but the British had no idea which one of their rowdy sailors had gotten into this particular brawl. Lin withdrew all Chinese from the factories and prepared to reconfine the British in them, but before he could, Elliot got everyone together and moved down to Hong Kong.
The British government had been intending to go to war anyway, as previously stated, not to force drugs on the Chinese, but to attain a variety of trade and legal concessions whose design was mainly to ensure the ability of the British to carry on normal trade with China. Not wanting to go way-the-hell-overboard in pursuit of this goal, Palmerston ordered the British Navy to blockade the Chinese mainland as far north as Beihe, which, being close to Beijing, would hopefully convince the Chinese to listen. Chinese casualties were minimized by the use of relatively safe, non-scattering ammunition, and the British generally tried to use force in proportion to what they thought were modest demands. They gave a letter to the Chinese, who were now much more willing to listen, and its wording gave the Chinese the impression that if they just dismissed Lin, the main anti-opium activist, the British would be satisfied. Lin was sent into exile, and the British were persuaded to meet the Governor-General at Canton to start the peace talks.
Elliot quickly accepted the offer, since he thought the blockade was a dumbass idea anyway. He and Governor-General Qishan met up to discuss peace. Unfortunately, the emperor had let his ear be taken by pro-war parties, and had decided to kill all the British after he'd had time (provided by an extension of the peace talks) to assemble an appropriately large force. Some hostilities continued throughout this time, too. Elliot had a way of moving into an area and having a battle almost totally won before retreating in order to let the Chinese think about their defeat while they talked peace. This meant that Qishan could report to Beijing that he had won these battles, because, after all, the enemy had retreated. When he attacked the forts at the Bogue, he had no casualties to the Chinese Manchu detachment's almost total defeat, but his reliance on a raiding strategy made it easy for the Chinese to report these as victories, thereby providing an excuse for the emperor to continue the war. Elliot did this repeatedly; once more at the Bogue forts before moving up to Canton simply to display the fleet. Elliot then commanded the general of the army troops stationed there, General Gough, to take the heights surrounding Canton. When he did that and no more, the local gentry organized troops to move against the British, thinking them weak because of inaction. The gentry's troops caught a small detachment of troops with wet ammunition and made them retreat with negligible losses, whereupon the gentry declared victory and disbanded its army.
After this rather silly display and the bipartisan rejection of the peace signed by Elliot and Qishan (along with imprisonment of the latter and firing of the former) it was made clear that the conflict was going to take a while. The Chinese didn't want to give up Hong Kong, and the British didn't want it anyway--Palmerston wanted to have some trading rights at multiple ports and for the Chinese to pay for the burned opium. In 1841, the British replaced Elliot with Sir Henry Pottinger, a brisk, forceful man who had lived in India all his life. His instructions were to sail up the river to Nanjing, where he was to take control of the Grand Canal, a major fixture of Chinese transportation. They met virtually no opposition until they got to the town of Jinjiang, where things got nasty. Chinese bannerman not only contested their posession of the town every step of the way, they reacted to failure by killing their wives and children prior to their own suicide. This greatly unnerved the British, who had been under the impression up to this point that they were fighting for something that really wasn't all that big a deal. The Chinese, however, had been convinced over the course of centuries that their emperor was not just a ruler but actually the source of all civilization, and this left them ill-prepared for defeat. As they continued to approach Nanjing, word was sent to the emperor that they could not hope to win this war, so he sent his nicest and most important relatives, princes Yilibu and Qiying to Nanjing to talk. They consented to do so, and even went so far as to treat Pottinger as an equal once they had established the fact that he only cared about trade, not conquest.
The Chinese hadn't really wanted to give up Hong Kong, although it wasn't so much the territory they didn't want to lose as it was the people, but they wound up ceding it outright anyway. British citizens and Christians were given the right to be tried by British authorities even if they committed the crimes in mainland China, and the tariffs placed on British goods were set at 5%. Opium was not mentioned in the treaty, with the exception of the indemnity to be paid. The British outlawed its importation at Hong Kong, but the Chinese authorities effectively, although not actually, legalized it at the same time. Other ports were also opened up for trade and the Hong system of trade was abolished, since it hadn't been working very well for anyone involved. It's been said that the treaty of Nanjing, as it was called, was an instrument of European imperialism, but the author from whose work I've taken most of the facts here (Jack Gray, Rebellions and Revolutions: China from the 1800s to the 1980s) disagrees. He states that none of the items of the treaty in and of themselves did anything that was particularly awful for the Chinese. He doesn't deny that the British acted in that manner later, but does say that the Treaty of Nanjing was not responsible. I'll reserve my own opinion on the matter until I see the treaty itself, but one can't overlook the fact that the British insisted repeatedly that the English language version of the treaty was "official" and therefore some points of its wording that were advantageous to the British were lawful, allowing them to take Hong Kong outright rather than maintaining a joint presence.
*There is more information I could put here about this, but I'm not sure there'd be demand to see it. If you want it to be added, drop me a /msg.