Xu Yanwang zhi 徐偃王志 "The Story of King Yan from Xu", also called Xu Yanwang zhiyi 徐偃王志異 "The wonderful story of King Yan of Xu", was a story that might have had the shape of a book but has only survived as a fragment quoted in Zhang Hua's 張華 short encyclopaedia Bowuzhi 博物志 from the Western Jin period 西晉 (265-316). From the geographical names in the story it can be seen that the text was written during the early Later Han period 後漢 (25-220 CE). Liu Jianguo 李劍國 assumed that the author was Liu Xi 劉熙.
The story of King Yan of Xu is not mentioned in any Zhou-period 周 (11th cent.-221 BCE) source except the books Shizi 尸子, Xunzi 荀子 and Hanfeizi 韓非子. King Yan was the ruler of the non-Chinese state of Xu during the late Western Zhou period 西周 (11th cent.-770 BCE). It might therefore be that the story of the king was a popular tale and not historically recorded. The name of the King at least appears in the chapters Qin benji 秦本紀 and Zhao shijia 趙世家 of the history Shiji 史記. The fragment in the Bowuzhi gives a very crude overview of King Yan's life and is influenced by the belief in supernatural powers.
He was believed to have been conceived by a palace maid in Xu, but she gave birth to an egg that she discarded into a river. The egg was found by the dog of a peasant couple. When the egg set free a boy, they raised him. Later on he was brought to the palace and became the lord of Xu. He was known as a benevolent ruler and was venerated by 36 other regional rulers. The king of Zhou was envious and ordered the king of Chu 楚 to attack him. King Yan, loving his people refused to fight and fled to Pengcheng 彭城, where he lived for some time as a hermit on a mountain.
Although the story reflects some Confucian thoughts about an ideal ruler, it also reflects the troubles that the kings of Zhou always had with the "Eastern Barbarians" (dongyi 東夷, see Yi 夷). Another aspect is the supernatural birth of the king, which can be compared with many similar stories of ancestral myths. The book is therefore one of the earliest examples of the genre of phantastic stories (chuanqi 傳奇), and might have influenced later novellas.
It is mentioned in the books Houshanshu 後漢書, Soushenji 搜神記, Shuijingzhu 水經注, Shuyiji 述異記 and Guo Yuansheng's 郭緣生 Shuzhengji 述征記. The Tang-period 唐 (618-907) writer Han Yu 韓愈 (768-824) wrote an inscription for the King's temple called Quzhou Xu Yanwang miao bei 衢州徐偃王廟碑. This temple still stands today in Quzhou, Zhejiang. Surviging fragments of the Xu Yanwang zhi were collected by the Qing-period scholar Xu Shidong 徐時棟 (1814-1873).