The United Kingdom captures Hong Kong as a base as it prepares for war with Qing China. The ensuing three-year conflict will later be known as the First Opium War.

The Anglo-Chinese War, also known as the Opium War or the First Opium War, was a series of military engagements fought between Britain and the Qing dynasty between 1839 and 1842. The immediate issue was the Chinese seizure of private opium stocks at Canton to stop the banned opium trade, and threatening the death penalty for future offenders. The British government insisted on the principles of free trade and equal diplomatic recognition among nations, and backed the merchants' demands. The British navy defeated the Chinese using technologically superior ships and weapons, and the British then imposed a treaty that granted territory to Britain and opened trade with China. Twentieth century nationalists considered 1839 the start of a century of humiliation, and many historians considered it the beginning of modern Chinese history.In the 18th century, the demand for Chinese luxury goods (particularly silk, porcelain, and tea) created a trade imbalance between China and Britain. European silver flowed into China through the Canton System, which confined incoming foreign trade to the southern port city of Canton. To counter this imbalance, the British East India Company began to grow opium in Bengal and allowed private British merchants to sell opium to Chinese smugglers for illegal sale in China. The influx of narcotics reversed the Chinese trade surplus, drained the economy of silver, and increased the numbers of opium addicts inside the country, outcomes that seriously worried Chinese officials.

In 1839, the Daoguang Emperor, rejecting proposals to legalise and tax opium, appointed Viceroy Lin Zexu to go to Canton to halt the opium trade completely. Lin wrote an open letter to Queen Victoria, which she never saw, appealing to her moral responsibility to stop the opium trade. Lin then resorted to using force in the western merchants' enclave. He arrived in Guangzhou at the end of January and organized a coastal defense. In March, British opium dealers were forced to hand over 2.37 million pounds of opium. On 3 June, Lin ordered the opium to be destroyed in public on Humen Beach to show the Government's determination to ban smoking.All other supplies were confiscated and a blockade of foreign ships on the Pearl River was ordered. The British government responded by dispatching a military force to China. In the ensuing conflict, the Royal Navy used its superior naval and gunnery power to inflict a series of decisive defeats on the Chinese Empire. In 1842, the Qing dynasty was forced to sign the Treaty of Nankingthe first of what the Chinese later called the unequal treatieswhich granted an indemnity and extraterritoriality to British subjects in China, opened five treaty ports to British merchants, and ceded Hong Kong Island to the British Empire. The failure of the treaty to satisfy British goals of improved trade and diplomatic relations led to the Second Opium War (185660). The resulting social unrest was the background for the Taiping Rebellion, which further weakened the Qing regime.

The Qing dynasty (English: CHING), officially the Great Qing, was the last dynasty in the imperial history of China. It was established in 1636 in Manchuria (modern-day Northeast China), and in 1644 its rule extended to cover all of China and lasted until 1912. In 1917, it was briefly restored in an episode known as the Manchu Restoration, albeit lacking in international recognition. In orthodox Chinese historiography, the Qing dynasty was preceded by the Ming dynasty and succeeded by the Republic of China. The multiethnic Qing empire lasted for almost three centuries and assembled the territorial base for modern China. It was the largest Chinese dynasty and in 1790 the fourth largest empire in world history in terms of territorial size. With a population of 432 million in 1912, it was the world's most populous country at the time.

In the late sixteenth century, Nurhaci, leader of the House of Aisin-Gioro, began organizing "Banners" which were military-social units that included Manchu, Han, and Mongol elements. Nurhaci united clans to create a Manchu ethnic identity and officially proclaimed the Later Jin dynasty in 1616. His son Hong Taiji declared the Qing dynasty in 1636. As Ming control disintegrated, peasant rebels conquered Beijing in 1644, but the Ming general Wu Sangui opened the Shanhai Pass to the armies of the regent Prince Dorgon, who defeated the rebels, seized the capital, and took over the government. Resistance from the Ming loyalists in the south and the Revolt of the Three Feudatories delayed the complete conquest until 1683. The Kangxi Emperor (1661–1722) consolidated control, maintained the Manchu identity, patronized Tibetan Buddhism, and relished the role of Confucian ruler. Han officials worked under or in parallel with Manchu officials. The dynasty also adapted the ideals of the tributary system in asserting superiority over peripheral countries such as Korea and Vietnam, while extending control over Tibet and Mongolia.

The height of Qing glory and power was reached in the reign of the Qianlong Emperor (1735-1796). He led Ten Great Campaigns that extended Qing control into Inner Asia and personally supervised Confucian cultural projects. After his death, the dynasty faced changes in the world system,

foreign instrusion, internal revolts, population growth, economic disruption, official corruption, and the reluctance of Confucian elites to change their mindsets. With peace and prosperity, the population rose to some 400 million, but taxes and government revenues were fixed at a low rate, soon leading to fiscal crisis. Following China's defeat in the Opium Wars, Western colonial powers forced the Qing government to sign "unequal treaties", granting them trading privileges, extraterritoriality and treaty ports under their control. The Taiping Rebellion (1850–1864) and the Dungan Revolt (1862–1877) in Central Asia led to the death of over 20 million people, from famine, disease, and war. The Tongzhi Restoration of the 1860s brought vigorous reforms and the introduction of foreign military technology in the Self-Strengthening Movement. Defeat in the First Sino-Japanese War of 1895, led to loss of suzerainty over Korea and cession of Taiwan to Japan. The ambitious Hundred Days' Reform of 1898 proposed fundamental change, but the Empress Dowager Cixi (1835–1908), who had been the dominant voice in the national government for more than three decades, turned it back in a coup.

In 1900 anti-foreign "Boxers" killed many Chinese Christians and foreign missionaries; in retaliation, the foreign powers invaded China and imposed a punitive Boxer Indemnity. In response, the government initiated unprecedented fiscal and administrative reforms, including elections, a new legal code, and abolition of the examination system. Sun Yat-sen and revolutionaries debated reform officials and constitutional monarchists such as Kang Youwei and Liang Qichao over how to transform the Manchu Empire into a modern Han Chinese nation. After the deaths of the Guangxu Emperor and Cixi in 1908, Manchu conservatives at court blocked reforms and alienated reformers and local elites alike. The Wuchang Uprising on 10 October 1911 led to the Xinhai Revolution. The abdication of Puyi, the last emperor, on 12 February 1912, brought the dynasty to an end.