The first state that governed the current area of Cenxi was the
Nanyue Kingdom, which was succeeded by the
Han dynasty, which established
Mengling County (猛陵縣) in the current area of Cenxi. During the
Southern dynasties in A.D. 524,
Yongye Commandery (永業縣) was established on current area of Cenxi, whereas during the
Sui dynasty in A.D. 583, its administrative level was changed to County. Later in the
Tang dynasty in A.D. 622, it was restructured to
Nanyi Zhou (南義州), which was subdivided into 3 counties: Anyi (安義), Longcheng (龍城) and Yicheng (義城). In A.D. 757, Longcheng County was renamed to Cenxi County, which became the precursor of current name. During the
Northern Song dynasty in A.D. 973, the aforementioned 3 counties were reintegrated into Cenxi County, and then this name was retained during subsequent dynasties and states. ==Geography==