Bao'an County , formerly named Xin'an County is a historical region of South China. It is the predecessor of the modern city of Shenzhen.
During the Han Dynasty, and at the time of the Three Kingdoms, the later Bao'an County, together with those of Dongguan and Boluo, formed only one large district, bearing the name of Boluo .
In 331, the Eastern Jin Dynasty established Bao'an County, which was one of the six counties under Dōngguān Prefecture. This prefecture's area covered modern Shenzhen and Dongguan. Since the second year of the Zhide of of the Tang Dynasty , Dōngguān was renamed to Dōngguǎn . Hongwu Emperor, the founder of the Ming dynasty , found it necessary in the 27th year of his reign to appoint an officer with the title "Shou-yu-suo" - ''Protector of the region'', in order to protect the population, which was rapidly increasing, against the bands of robbers and vagabonds which infested the district.
During the age in Ming Dynasty, Bao'an County was renamed to Xin'an County in 1573 AD. Its areas covers modern Shenzhen and Hong Kong.
In Qing Dynasty, the Xin'an County, to which the mainland opposite to the Island of Hong Kong belongs, was one of the fourteen districts of the department of Guangdong. From 1842 to 1898, 1055.61 km2 out of 3076 km2 of Xin'an County was ceded to United Kingdom to form Hong Kong.
After the Republic of China was founded, the name of Xin'an was changed back to Bao'an in 1913.
In 1979, Bao'an County was renamed to Shenzhen City and became a Special Economic Zone.