The walled city was built in 1825, the first city in Taiwan with earthen walls. Qing troops were stationed to the left of the city, and the area came to be known accordingly as Tsoying (" the left encampment ").
此地清代屬鳳山縣治，舊城池建於清道光五年（一八二五），是台灣第一座土造城牆，因清代陸軍軍隊駐紮城左，所以此地又稱左營。