Liaoshi 遼史 "History of the Liao" is the official dynastic history (zhengshi 正史) of the Liao dynasty 遼 (907-1125) that was founded by the Kitan 契丹 leader Abaoji 阿保機 (Emperor Taizu 遼太祖, r. 916–926). The book was compiled by a team under the supervision of Toqtoɣa (Chinese transcription: Tuotuo 脫脫).
It is divided into 116 juan, of which 30 are imperial annals-biographies (benji 本紀), 45 normal or collective biographies (liezhuan 列傳), 31 treatises ( 志), and 8 tables (biao 表). The book covers history of the Kitan previous to the founding of the dynasty, the dynastic period itself, as well as the history of the Kitans after their migration to the west (the so-called Western Liao 西遼, or "Black Kitans", Türkic: Qara-Ḫitai). An appendix deals with terms in Kitan language within the dynastic bureaucracy (116 Guoyu jie 國語解).
The primary sources for the compilation of the Liaoshi were in first instance the dynasty's own records, like the imperial diaries (qijuzhu 起居注) of the rulers, the daily records (rili 日曆 "daily progress") or records about the most important non-routine memorials and edicts, the so-called "veritable records" (shilu 實錄), but also whole historical outlines (guoshi 國史 "state or dynastic history").
The treatises of the Liaoshi begin with a very unique theme, namely the imperial palace guard (31-33 宮衛志), and then proceed to the military system (34-36 Bingwei zhi 兵衛志), a theme otherwise not standing in such a prominent position, administrative geography (37-41 Dili zhi 地理志), calendar (42-44 Lixiang zhi 曆象志), state offices (45-48 Baiguan zhi 百官志), court rituals (49-53 Li zhi 禮志), court music (54 Yue zhi 樂志), court ceremonies (55-58 Yiwei zhi 儀衛志), food and commodities (59-60 Shihuo zhi 食貨志), and penal law (61-62 Xingfa zhi 刑法志).
The tables include a genealogy of the dynasty (63 ShibiaoHuangzi biao 皇子表), princesses (65 Gongzhu biao 公主表), distant relatives of the dynasty (66 Huangzu biao 皇族表), relatives of empresses (67 Waiqi biaoYouxing biao 遊幸表), chieftains of various tribes of the Kitan federation (69 Buzu biao 部族表) and of the rulers of vassal states (70 Shuguo biao 屬國表).
The collective biographies cover the themes imperial consorts (71 Houfei liezhuan 后妃列傳), the imperial house (72 Zongshi liezhuan 宗室列傳), writers (103-104 Wenxue liezhuan 文學列傳), competent officials (105 Nengli liezhuan 能吏列傳), persons of moral superiority (106 Zhuoxing liezhuan 卓行列傳), outstanding women (107 Lienü zhuan 列女傳), magicians and diviners (108 Fangji liezhuan 方技列傳), masters of musical entertainment and eunuchs (109 Lingguan huanguan liezhuan 伶官宦官列傳), treacherous ministers (110-111 Jianchen liezhuan 姦臣列傳), rebels (112-114 Nichen liezhuan 逆臣列傳), and foreign countries (115 Er guo wai ji liezhuan 二國外記列傳: Korea and the Western Xia empire 西夏, 1038-1227).
The last chapter of the Liaoshi is an explanation of Kitan language terms in Chinese (Guoyu jie 國語解).
The first histories of the Liao dynasty were compiled under its successor, the Jin dynasty 金 (1115-1234), first with a book titled Liaoshi and written by Prince Yelü Gu 耶律固 (late 11th cent.), and Xiao Yongqi 蕭永祺 (fl. 1149, courtesy name Jingchun 景純, original name Pulie 蒲烈). This book was finished in 1148 but never published, and is therefore lost. The second precursor of the Liaoshi was compiled by Yelü Lü 耶律履 (1131–1191, courtesy name Lüdao 履道), Dang Huaiying 黨懷英 (1134–1211, courtesy name Shijie 世傑, style Zhuxi 竹溪, posthumous title Wenxiangong 文獻公) and finished by Chen Daren 陳大任 but was also lost at a very early date.
When the Mongolian emperor Qubilai Qan (Emperor Shizu 元世祖, r. 1260–1294) ordered the compilation of the official dynastic histories of the Liao and Jin in 1264, there was only scarce material left to undergo this task. This might be one of the reasons why the compilation was postponed until 1343. The compilation of the history of the Liao was overseen by Lianhaishan Haiya 廉惠山海牙 (who was of Uyghurian origin), Wang Yi 王沂, Xu Bin 徐昺, and Chen Yiceng 陳繹曾 (dates unknown, courtesy name Bofu 伯敷 or 伯孚). As main sources served the veritable records as compiled by Yelü Yan 耶律儼 (d. 1113, courtesy name Ruosi 若思), and Chen Daren's older Liaoshi.
Further information about the Liao dynasty was extracted from the Zizhi tongjian 資治通鑑, the Qidan guo zhi 契丹國志, an older history of the state of the Kitan written during the Southern Song period 南宋 (1127-1279), and the various chapters on the Kitan people from older dynastic histories. The result of this compilation work is therefore relatively unsatisfactory, if compared with the other dynastic histories. It was criticised for redundancy in some places, for terseness in others, besides from the many errors and inconsistencies occuring through all chapters, especially in dealing with the names of persons which were often rendered with different Chinese characters in different parts of the book.
The Liaoshi is nevertheless of extremely high value just because it is one of the few sources about the Kitan dynasty at all, besides the Qidan guo zhi. This is especially true for the treatises dealing with the Kitan military and administration structure.
The first print of the Liaoshi was produced a few years after its completion, together with the Jinshi. The oldest surviving print from the Yuan period 元 (1279-1368) is preserved in the Bona edition 百衲本 of the dynastic histories, but it is unfortunately full with typing errors. The Zhonghua Book Company 中華書局 edition from 1976 tried to eradicate these errors.
Text-critical editions were published by Li E 厲鄂 (Liaoshi shiyi 遼史拾遺) and Yang Fuji 楊復吉 (1747–1820, courtesy name Lie'ou 列歐 or Liehou 列侯, style Menglan 夢蘭 or Huilou 慧樓, Liaoshi shiyi bu 遼史拾遺補).