Líu Ān (Chinese: 劉安, c. 179 – 122 BC) was a Chinese king and advisor to his nephew, Emperor Wu of Han (武帝). He is best known for editing the (139 BC) Huainanzi compendium of Daoist, Confucianist, and Legalist teachings. Early texts represent Liu An in three ways: the "author-editor of a respected philosophical symposium", the "bumbling rebel who took his life to avoid arrest", and the successful Daoist adept who transformed into a xian and "rose into the air to escape prosecution for trumped-up charges of treason and flew to eternal life."
He was a grandson of the founding Han Dynasty (漢朝) emperor Liu Bang (劉邦), and he became the King of Huainan (literally "south of the Huai River"), at the age of 16 after his father, Liu Chang (劉長), died.
Liu An had only two sons. The younger named Liu Qian (刘迁) was born by his princess consort and thus created heir to Huainan, while the elder, named Liu Buhai (刘不害), born by a concubine, was so unfavored that Liu An and his princess consort never viewed him as their son and Liu Qian never regarded him as his elder brother. According to Tui'en Ling (推恩令, Order to Expand Favours), Liu Buhai could become a marquess if Liu An carved a part of Huainan for him as his fief, but Liu An never did so. Liu Jian (刘建), son of Liu Buhai, having realized that both he and his father had little chance to be a marquess, became so resentful that he accused Liu An and Liu Qian of coup attempt. Finally, in a fate similar to his father, Liu An committed suicide after his plot was revealed.
Noted for his literary ability, Liu An was reputed to be able to compose an elaborate prose between waking and finishing breakfast. In addition to composing literary pieces himself, Liu An also frequently invited other scholars as guests to his estate. Eight of these scholars in particular became known as the Eight Immortals of Huainan (淮南八仙).
Together with the Eight Immortals of Huainan and/or other members his literary circle, Liu An published a treatise in 139 BCE. known as the Huainanzi (淮南子), translated as "Book of the Master of Huainan", or the "Huainan Philosophers". This book is considered one of the cornerstones of Daoist philosophy, along with the works of Laozi and Zhuangzi. Along with the earlier Shu Jing (Classic of History) of the 5th century BC (Warring States era), this book provided further concrete information on geography, including descriptions of the topography of China. His book was also concerned with mathematics and music, making use of the "Pythagorean comma" and listing the first known Chinese 12 musical tone tuning.
Chu ci 
One of the two major ancient Chinese poetry collections was the Chu ci, also known as The Songs of the South or The Songs of Chu (the other being the Shijing). The seminal poem of the collection is the "Li Sao", generally agreed to be by Qu Yuan. Liu An wrote an introduction to the "Li Sao" as well as the first known commentary. There is also reasonable evidence that Liu An was the first editor and anthologist of the original Chu ci collection. The poem "Zhao yin shi" (Summons for a Recluse") is attributed to him and "Yuan You" ("Far-off Journey") shows many similarities to the work of the literary circle around Liu An.
Legend of inventing Soy Milk 
According to the legend, soy milk was developed by Liu An who made it for his mother who was old and ill but want to taste soybean which her teeth would not be able to chew. Liu An was very troubled by that and the idea of grinding the soybean was actually suggested by his mother, although there is no historical evidence for this legend. In Bencao Gangmu, where Li was attributed to the development of bean curd with no mention of soy milk being invented by anyone, the story was also told by another Ming dynasty writer, Li Yi (李翊). although earlier 10th century writing, the song of bean curd (豆腐詩), already mentioned the method of Huainan in Song dynasty by Zhu Xi It is also mentioned in a book which mentioned bean curd was called Lai Ki in Han dynasty, and the word appeared in an early Song dynasty writing. While other Chinese sources was found to discredit the Liu An invention theory, stating Liu An lived with a lot of vegetarian monks and the method was taught by them, or it is the Chinese daoists that was recruited by him used alchemy methods and made both soy milk and bean curd in a more alchemical method as medicines of eternal life, and Liu An is only the powerful noble at that time where he can order the mass-production of such items and spread it around thus making him famous for soy milk and bean curd. Yet most soy bean related work place still places Liu An as the god of bean curd and worship him as the inventor of both soy milk and bean curd.
A different tradition could be found in 《金華地方風俗志》 and 《中國風俗故事集》mentioning soy milk and bean curd was made before the Han dynasty and dated it all the way back to the warring states period by the Yan general Yue Yi, Yet these two books are rather recent and the quote in it was only a legend told to bean curd makers by speech without written record.
See also 
- Wallacker, p. 36.
- Hawkes, 243 and 191-193
- 「種豆豆苗稀，力竭心已腐，早知淮南術，安坐獲泉布。」 Planting soybeans but the harvest was little, the body is tired and the mind is rotted, if the method of Huainan was known earlier (by me), (I) would be able to get a lot with just relaxly sitting there.
- 《行神研究》引 《綺翁憶梅庵雜記》記豆腐業淮南王劉安云：「 相傳農曆九月十五日，為淮南王劉安誕辰，內地豆腐業者均於本日舉行之公祭，祭畢聚餐。」劉安為西漢人，具辯才，善屬文，好讀書鼓琴，天下方術之士多歸之，在其在發明豆腐時，蜀人名曰「黎祈」，故陸游詩有「洗釜煮黎祈」句，惟何時名為豆腐，則不可考。
- 《中國行業神》, 李喬
- 《中國民間神像》, 宋兆麟
- *Hawkes, David, translator and introduction (2011 ). Qu Yuan et al., The Songs of the South: An Ancient Chinese Anthology of Poems by Qu Yuan and Other Poets. London: Penguin Books. ISBN 978-0-14-044375-2
- Needham, Joseph (1986). Science and Civilization in China: Volume 3. Taipei: Caves Books, Ltd.
- Wallacker, Benjamin E. (1972), "Liu an, Second King of Huai-nan (180?-122 B. C.)," Journal of the American Oriental Society 92.1, pp. 36-51.
- The Huainan Zi text of Liu An
- The Dao of the Military: Liu An's Art of War, (Columbia University Press, 2012)