Guilin is a city steeped in history. Archaeological discoveries in Baoji cliff and Zengpi cliff caves suggest that human ancestors inhabited Guilin around 10,000 years ago. During the Xia (c. 21st century-16th century BC), Shang (c. 16th century-11th century BC), and Zhou (c. 11th century-771 BC) Dynasties, Guilin was home to the Baiyue people.
In 214 BC, the first Chinese emperor Qinshihuang of the Qin Dynasty (221 BC-207 BC) ordered the construction of the Lingqu Canal, which connected the Xiangjiang River and Lijiang River. This made Guilin an important southern town that connected the sea area to the north and the Central Plains. The name "Guilin" originated from the city's abundance of cinnamon, which was known as "玉桂" in Chinese.
In 111 BC, Shi'an county was established in what is now Guilin, under the jurisdiction of Lingling prefecture in Jingzhou. During the Three Kingdoms period (220-265), it was first ruled by Shu Han, then by Wu. In 265, Shi'an prefecture and Shi'an county were established in what is now Guilin. In 634, it was renamed Lingui county. During the Ming (1368-1644) and Qing (1644-1911) Dynasties, Guilin was under the administration of Guilin Prefecture in Guangxi Province. During the Republic of China (1912-1949), it was under the administration of Guangxi Province. In 1914, it was renamed Guilin county, and in 1940, it was upgraded to Guilin city. Guilin was the capital of Guangxi Province for a long time during the Republic of China.
Guilin was liberated on November 22, 1949, and came under the direct administration of Guangxi Province. In 1958, it was renamed Guilin city of the Guangxi Zhuang Autonomous Region, and administered the urban and suburban areas of Guilin. In July 1981 and October 1983, Yangsu county and Lingui county were respectively incorporated into Guilin. On December 26, 1996, approved by the State Council, Guilin renamed its suburban area as Yanshan district. On September 8, 1998, approved by the State Council, Guilin city integrated with Guilin area to form a new Guilin city, which administers six districts, including Xiufeng, Diecai, Xiangshan, Qixing, Yanshan, and Lingui districts, as well as Lipu city and 10 counties (autonomous county), such as Yangsu, Lingchuan, Lingui, Quanzhou, and others.