The Opium War opened China up to foreign trade for the first time, but also threatened the stability of the Manchu government and made China a center for illegal activity. The conflict actually had two phases, from 1839 to 1842 and again from 1856 to 1860, pitting the Qing rule in China against the British Empire.
The agreements of Tientsin and Nanking ended up opening many Chinese ports, allowing trade to enter the country at a significant level for the first time, leading to increases in tea exports of more than 500 percent and silk exports skyrocketing more than 28 times their prior levels. The abolition of the Hong meant that foreigners had free trade rights in China as well. Import duties fell from 65 percent to 5 percent, ruining many Chinese industries and sending China's financial system to the brink of ruin.
While tea and silk took off, agriculture became much less profitable, leading farmers to switch crops to silk or tea. Prices for food shot through the roof, and the textile industry went through the shock of competition with cheaper goods from abroad.
The Manchu rulers in the Qing dynasty also lost considerable credibility, because they had signed peace treaties instead of exerting maximum resistance. Combined with the growing poverty, this led to many uprisings against the Qing.