In 1839 the Daoguang Emperor, rejecting proposals to legalise and tax opium, appointed viceroy Lin Zexu who confiscated 20,000 chests of opium (approximately 1210 tons or 2.66 million pounds) and without offering compensation blockaded foreign trade in Canton. The British responded with a strike on the Chinese fleet, devastating them with superior naval power. Commencing in late June 1840 the first part of the expeditionary force arrived in China aboard 15 barracks ships, four steam-powered gunboats and 25 smaller boats that reached the mouth of the Pearl River under the command of Commodore Bremer. Britain gained greatly as a result, claiming Hong Kong, and five open ports for trade. The power struggle continued, fuelled by the pursuit of liberalisation, when John Bowring was appointed British consul at Canton (today's Guangzhou). Bowring had an impressive array of credentials: honorary diplomas from universities in Holland and Italy, fellowships of the Linnaean Society of London and Paris, the Historical Institute of the Scandinavian and Icelandic Societies, the Royal Institute of the Netherlands, the Royal Society of Hungary, the Royal Society of Copenhagen, and of the Frisian and Athenian Societies. As superintendent of trade in China, he would see to the full implementation of the Nanking Treaty across another flare up of the Opium War for which he was largely blamed. Bowring would pay dearly for his administration, all occurring amid one of the bloodiest wars in human history, the undisputed bloodiest civil war and the largest conflict of the 1800’s, with casualties estimated conservatively between 20–70 million and peaking at 100 million, with millions more displaced.
Hostilities had began on January 1, 1851, when the Qing Green Standard Army (ethnic Han soldiers operating concurrently with the Manchu-Mongol-Han Eight Banner armies) launched an attack against the God Worshipping Society at the town of Jintian, Guangxi. Their leader Hong, had declared himself the Heavenly King of the Heavenly Kingdom of Peace (or Taiping Heavenly Kingdom “Taipings”). The Taipings escaped by marching north in September 1851 and on March 19, 1853, they captured the city of Nanjing where Hong declared his capital. A local irregular army called the Xiang Army, under the personal leadership of Zeng Guofan, became the main armed force fighting for the Qing against the Taiping. In 1856 the Taipings were weakened after infighting following an attempted coup led by the East King, Yang Xiuqing. During this time the Xiang Army managed to gradually retake much of Hubei and Jiangxi province. In May 1860 the Taiping defeated the imperial forces that had been besieging Nanjing since 1853, eliminating them from the region and opening the way for a successful invasion of southern Jiangsu and Zhejiang provinces, the wealthiest region of the Qing Empire. The Taiping rebels attempt to capture Shanghai in 1860, but the Qing’s government forces were aided by Western officers. Whilst the Taipings were preoccupied in Jiangsu, Zeng's forces followed the Yangzi River to capture Anqing on September 5, 1861.
After the prolonged siege and cut supply chain Hong died on June 1, 1864, with Nanjing falling 18 days later. Afterwards a small remainder of loyal Taiping forces continued to fight in northern Zhejiang, rallying behind Hong's teenage son Tianguifu, but after Tianguifu's capture on October 25, 1864, Taiping resistance was gradually pushed into the highlands of Jiangxi, Zhejiang, Fujian and finally Guangdong, where the last Taiping loyalist, Wang Haiyang, was defeated on January 29, 1866. Hong’s sect as a God worshipping society had originally sanctified the ‘Good Words to Admonish the Age’ by the Chinese preacher Liang Fa. Hong preached a mixture of communal Utopianism, Evangelism, and Christianity and under their auspices' he forbid Opium consumption, proclaimed sexual equality, segregated men and women, all whilst encouraging his followers to pay their assets into the communal treasury. Hong had originally struggled with the Imperial examination, and whilst in a delirious state dreamt that he visited Heaven discovering his celestial family was distinct from his earthly family, and included a heavenly father, mother, elder brother, sister-in-law, wife, and son. Although of difference to the confucian order of benign juxtaposition which he attempted to purge, his standard was to accept the certain measure of parallax, in heaven and earthly domains. In tradition to Taoism which has often been the Chinese state religion, itself was based on the indigenous religion of Bon shamanism and the authoritarian standard to application of medical process according metaphysical sense (Astrology, Feng Shui, and Martial Arts all incorporate this divinatory process).
Sir John Bowring became Governor of Hong Kong and was instrumental to the formation in 1855 of the Board of Inspectors established under the Qing Customs House, operated by the British to gather statistics on trade on behalf of the Qing government and, later, as the Chinese Imperial Maritime Customs Service, to collect all customs duties. This vital reform brought an end to the corruption of government officials leading to the modernisation of China's international trade. Having concerns for the welfare of Chinese labourers ‘coolies’, who were being exported to Australia, California, Cuba and the West Indies, and in witness to the coolie revolt in Amoy, May 1852; Bowring tightened enforcement of the Passenger Act so as to improve coolie transportation conditions and ensure their voluntariness. He legislated for Chinese citizens in Hong Kong to serve as jurors in trials and become lawyers additionally. Amoung several further reformations to the city he succeeded to abolish monopolies and established the first ever bilingual English-Chinese law, "An Ordinance for licensing and regulating the sale of prepared opium" (Ordinance No. 2 of 1858).
In October 1856, a dispute broke out with the Canton vice-consul Ye over the Chinese crew of a small British-flagged trading vessel, the Arrow. Bowring saw the argument as an opportunity to wring from the Chinese the free access to Canton which had been promised in the Treaty of Nanking but so far denied. With the French joining the fight, 80 treaty ports were soon established in China, involving many foreign powers, who were granted rights to travel within China. A Qing-sponsored campaign of civil disruption however eventually succeeded to destabilise the British administration with an arsenic attack. The poisoning of 15 January 1857 in which 10 pounds of arsenic was mixed in the flour of the colony's principal bakery, poisoned hundreds, and killed Bowring's wife, debilitating him for at least a year. After being subject to scandal and criminal libel against the editor of the Daily Press, Yorick J Murrow, Bowring’s day’s in Hong Kong were numbered. Taking up the role of commissioner to Italy in 1861, and subsequently the appointment of minister plenipotentiary and envoy extraordinary from the Hawaiian government to the courts of Europe, Sir Bowring would go on to negotiate treaties with Belgium, the Netherlands, Italy, Spain and Switzerland, all in addition to the title of Siam’s ambassador to the courts of Europe.