During the 18th century, a series of military conflicts known as the Opium War or the Anglo-Chinese War took place between Britain and the Qing Empire. The immediate issue leading to the war was China's official seizure of opium stockpiles at Canton and the threat of death penalty for future offenders. British merchants sought free commerce and equal diplomatic recognition for all nations, and with British government support, they achieved their goals. As a result of their victory, the British imposed a treaty that granted them territory in China and opened the country to trade.
The trade imbalance between China and the United Kingdom arose in the 18th century due to British demand for Chinese luxury goods like silk, porcelain, and tea. The Canton System limited inbound foreign trade to the port city of Canton and allowed European silver to enter China. To counteract this, the British East India Company began cultivating opium in Bengal and illicitly selling it to Chinese smugglers. This led to China's trade surplus being reversed, silver depletion, and a rise in opium addiction rates, causing concern among Chinese leaders.
In 1839, Lin Zexu, the nominated viceroy of the Daoguang Emperor, was tasked with eradicating the opium trade in Canton. He used forceful measures, including the seizure of opium supplies and imposing a naval blockade on the Pearl River. Lin also destroyed a large amount of European opium he had confiscated. In response, Britain dispatched a military force that achieved significant victories over the Chinese Empire, leading to the signing of the first "unequal treaties" in 1842. These treaties granted indemnity and extraterritoriality to British citizens in China, opened five treaty ports to British merchants, and ceded Hong Kong Island to the British Empire in compensation.