Yuancheng yulu 元城語錄 "Sayings of Master Yuancheng" is a "brush-notes"-style book (biji 筆記) written during the Northern Song period 北宋 (960-1126) by Ma Yongqing 馬永卿 (jinshi degree 1109), courtesy name Danian 大年, from Yangzhou 揚州 (in today's Jiangsu province). He is also known for his book Lanzhenzi 嫩真子. He held the offices of vice magistrate of Jiangdu 江都, district magistrate of Xichuan 淅川 and Xiaxian 夏縣, and an unknown office in the region of Guanzhong 關中 (around today's Xi'an 西安, Shaanxi).
The book has, in the transmitted form, a length of 3 juan, plus an appendix (Xinglu 行錄) of 1 fascicle. It is based on the thoughts and instructions of Liu Anshi 劉安世 (1048-1125), courtesy name Qizhi 器之, style Yuancheng Xiansheng 元城先生. Liu and Su Shi 蘇軾 (1037-1101) lived for a while in Yongcheng 永城 (in today's Hebei), where Ma Yongqing was assistant magistrate (zhubu 主簿). Hearing that the famous scholars lived in the town, he visited them and became their disciple. The book is based on the teachings and instructions of Liu Anshi, who in turn had learned a lot from Sima Guang 司馬光 (1019-1086).
The text is divided into 62 brief chapters speaking on various aspects of scholarship, history, current affairs, religion, thought and customs. It clarifies mistakes, criticises strengths and weaknesses of statements, and recommends to judge matters with caution. The statements are well-founded and reliable. Although the title marks the book as being of the type "sayings" (yulu 語錄), it does not consist of discourses or a question-and-answer pattern. More teachings and thoughts of Liu Anshi can be found in his Yuancheng Xiansheng jinyan ji 元城先生盡言集.
There are occasional errors in the book, such as the story of Emperor Taizu 宋太祖 (r. 960-975) crafting an incense burner. Zhou Bida 周必大 (1126-1204), in his Yutang zaji 玉堂雜記, remarking that attributing facts about the administrative system of the Yuanfeng reign-era 元豐 (1078-1085) to the time of Emperor Taizu was an error of forced association. As Liu Anshi cannot be blamed with making wrong statements intentionally, such errors should be considered a lapse of memory. However, the descriptive bibliography Siku quanshu zongmu tiyao 四庫全書總目提要 holds that Liu Anshi was an outsider among the great thinkers and that his "school" (Yuancheng xuepai 元城學派) was harshly criticised by Zhu Xi 朱熹 (1130-1200) because of his opposition to the eminent philosopher Cheng Yi 程頤 (1033-1107).
The Yuancheng yulu, nonetheless, was well received on the market. The appendix Yanxing is Cui Xian's 崔銑 (1478-1541) reconstruction of Liu's lost book Yanxinglu 言行錄.
The series Siku quanshu 四庫全書 includes a version commented by Wang Chongqing 王崇慶 (1483-1565) and titled Yuancheng yulu jie 元城語錄解.
Fragments of the book were collected by Wang Renjun 王仁俊 (1866-1913) and published with the title Yuancheng yulu yiwen 元城語錄佚文.
Apart from the Siku quanshu, the following series include the book: Tuobachan congke 托跋廛叢刻, Xiaowanjuanlou congshu 小萬卷樓叢書, Xiyinxuan congshu 惜陰軒叢書, Jifu congshu 畿輔叢書 and Congshu jicheng chubian 叢書集成初編.