The Kowloon Walled City was birthed in 1810 as a fortified military outpost of the Qing imperial government of China. It served to protect Hong Kong, particularly against hard-bitten pirates like the notorious Cheung Po Tsai. In 1839, it foiled the naval attack of British merchant ships right before the outbreak of the First Opium War.

After the Hong Kong Island was ceded to Britain, Qiying, the Governor-general of the Guangdong-Guangxi provinces, established the “Kowloon Assistant Military Inspectorate” in the Walled City to administer areas around Kowloon, the New Territories and the Island District. The Inspectorate also controlled over custom duties. Since then the Walled City, which had always been a cluster of commoners, became a place of utmost strategic importance stationed by both military and civil officers. In 1846, to strengthen defense, Emperor Daoguang sanctioned the construction of an outer wall lined with batteries that fenced in the City. Offices and soldier’s quarters, too, were to be built. All these having been completed, a castle-like walled garrison-city came into view in 1847. It was guarded by the Commodore of the Dapeng Brigade, which took care of the water in Hong Kong and Dapeng Bay (Mirs Bay), with a base of 150 soldiers. Imperial officers were also sent to station at the Victoria City on the Hong Kong Island, serving both as the intelligence and the official representative of the Qing court in dealing with the British colonial government. Residents in the Walled City were mainly Hakka stonemasons came from Huizhou, Guangdong.
The defeat of China in the Second Opium War gave the British government control over the territory of Kowloon south of Boundary Street. The Walled City, which was on the north adjoining the colonial region, could not clear out of the ever-present danger of a British raid. In 1898 when Western powers scrambled for lands all over China, the Qing court was again forced to lease the New Territories to Britain. It was stated, however, that the Kowloon Walled City would be excluded from the leased territory. The Walled City therefore retained its sovereignty, stationed by Qing officials and troops who moved in and out of the largely independent domain from a pier as in the past. There were over 500 soldiers and 200 residents in the City at that time.

In 1899, the British army came into conflict with the City’s soldiers and residents amid the handover of the New Territories. In consequence the British troops, expelling the Qing army, occupied the City, and for some time since the place was abandoned until former residents came back to reorganize it. Together with squatters and villagers that lodged nearby, they created a large Chinese community in the area.

Since the opening up of Hong Kong the Kowloon Walled City had always been an exotic enclave in the eyes of foreigners. The mysterious and ambiguous activities that characterized the City — rampant prostitution, gambling and drug trade — were both attractive and forbidding. Tempted by its obscurity foreigners in the past used to go on an excursion to the Walled City at weekends in search of adventure. Never in the history of Hong Kong has seen a place as special and famous as the Walled City. It was, indeed, a peculiar “theme park” unique not only to Hong Kong but also to the world at large.