At the end of the eighteenth century, the Qing dynasty in China faced numerous problems. A century of relative peace and prosperity had caused the population to double to around 300 million, while cultivable agricultural land had increased only by about 5%. As a result, millions faced starvation and took up banditry and rebellion. They joined forces with anti-Qing movements such as The White Lotus Society (for more on the White Lotus Society:
http://www.suite101.com/article.cfm/1817... At the same time, corruption among local officials was rife and this manifested itself in disasters such as flooding when moneys dispensed for maintaining dikes instead found their way into the pockets of iniquitous mandarins.
Perhaps worst of all, the curse of opium was becoming more and more thoroughly embedded in Chinese society. Opium was brought into China by British and American dealers, with British interests leading the way as opium was produced in imperial India and the money used to finance the administration of the British Empire. Purchase of opium was draining the country of its stores of precious metals and was also wreaking a terrible social cost. Maintenance and expansion of the opium trade was used by Western powers as a lever and pretext for insisting that the Emperor sign treaties with them as equal partners, in contrast to the millennia old policy of treating all outside states as being inferior.
In 1839, the governor of Hubei and Hunan, Lin Zexiu, was appointed as a special imperial commissioner to end the opium trade. Under Confucianist beliefs, the body is loaned to the individual as a link between past and future and does not belong to the person. Polluting the body with a drug such as opium, therefore, was considered to be a grave sin (for more about Confucius:
http://www.suite101.com/article.cfm/1817... However, Lin Zexiu's appeal to Queen Victoria and the British government to end the trade on moral grounds met with deaf ears. Consequently, he took to compelling the dealers to give up their stocks of opium, which were destroyed, as well as requiring ship captains to sign agreements not to participate in the trade.
This was considered unacceptable by the British and war was inevitable. Unfortunately for them, Chinese military mandarins had failed to appreciate the power wielded by western powers and felt that, even if their ships were potent, their men could easily be defeated on land. They were proved wrong after the British forces landed at Ningbo and destroyed and massacred the Chinese force sent to expel them, which had suffered from outdated technology and incompetent leadership that relied on oracles and omens and ended up attacking in the middle of a rainstorm.