For many centuries prior to the opium wars, China was an isolationist and self sustaining country, marked by distrust of outsiders, particularly the west. The emperor viewed all non-Chinese as “barbarians” and “foreign devils” and believed there was no foreign product worthy of opening it’s ports for. All goods would be vetted at the Port of Canton, keeping trade heavily controlled and largely unbalanced.
At the same time, England was becoming intoxicated by Chinese tea, silk, and porcelain and desperately sought their own product of similar value that could be used as currency in trade. It seemed to the British that they hit a gold mine when they began smuggling Indian opium into China in the 18th century. A product utterly unnecessary but wholly enslaving, opium spread like a disease throughout the country, and officials became alarmed at the rising addiction rate. In 1839, the Daoguang Emperor sent viceroy Lin Zexu to abolish the trade. Lin confiscated 20,000 crates of opium, blockaded trade, and confined foreign merchants to their quarters. In retaliation, the British government incited naval warfare, which lasted nearly three and a half years.
During the war, British forces occupied Shanghai, which (at the time) was a trading port with other Chinese cities. Then, when the British won the war, Shanghai was opened as one of five international ports as per the terms of the Treaty of Nanjing (1842). This drew quick international attention to the city, and a series of subsequent, unequal treaties carved out territorial concessions for the British, Americans, and French. Shanghainese who didn’t directly serve the foreigners were confined to the walled city of Shanghai, while the British and Americans formed the international settlement to the north and the French held their concession to the south.
This imperial segregation led to Shanghai’s unique neighborhoods of today, many of which still feel the influence of their old foreign invaders. The city’s famous Bund, once part of the international city, still features 19th century British architecture. Parisian vibes still run through the former French concession, with its narrow streets and towering parasol trees. And the former walled city, located mostly in the current Huangpu and Hongkou districts, feels much more traditionally Chinese.
The Opium Wars were ultimately devastating to China. The illegal trade ruined lives with addiction, and the treaties forced the country into an inferior position that ran counter to all its instincts. Still, Shanghai owes its very existence to the wars, and in that, a beautiful thing was birthed from tragedy.