Mingshi 明史 "History of the Ming" is the official dynastic history (zhengshi 正史) of the Ming dynasty 明 (1368-1644). Over time it had become common for a newly established dynasty to compile an official history of the preceeding one. The compilation of the Mingshi started in 1679 and was only finished in 1739, when it was submitted to the throne by Zhang Tingyu 張廷玉 (1672-1755).
The first imperial order to compile the history of the Ming was issued in 1645, one year after the Manchu conquest of Beijing, but at such an early point of time it was not possible to collect material and sources sufficient for such a task. Only in 1679 a Compilation Office for the History of the Ming (Mingshiguan 明史館) was established. The compilation team was headed by Xu Yuanwen 徐元文 (1634–1691, courtesy name Gongsu 公肅, style Lizhai 立齋) and led by Ye Fang'ai 葉方藹 (1629–1682), Zhang Yushu 張玉書 (1642–1711, courtesy name Suzun 素存), Tang Bin 湯斌 (1627–1687, courtesy name Kongbo 孔伯, style Jingxian 荊峴, later Qian'an 潛庵) and Xu Qianxue 徐乾學 (1631–1694, courtesy name Yuanyi 原一, style Jian'an 健庵). One of the most important contributors was the historian and thinker Wan Sitong 萬斯同 (1638–1702).
In 1691 the draft version with a length of 416 juan was finished, called Mingshigao 明史稿. Yet because it was lacking completeness and suffered from inconsistencies it was not submitted to the throne at that date.
Three years later a team of scholars took over the refining: Zhang Yushu, Xiong Cilü 熊賜履 (1635–1709, courtesy name Jingxiu 敬修 or Qingyue 青岳, style Sujiu 號素九 or Yuzhai 愚齋), Chen Tingjing 陳廷敬 (1638–1712, original name Jing 陳敬, courtesy name Ziduan 子端, style Yueyan 說岩, later Wuting shanren 午亭山人) and Wang Hongxu 王鴻緒 (1645–1723, original name Duxin 度心, courtesy name Jiyou 季友, style Yanzhai 儼齋 or Hengyun shanren 橫雲山人). Again, Wan Sitong and Qian Mingshi 錢名世 (1660–1730, courtesy name Lianggong 亮工) were asked to support the editors. In 1702 Wan Sitong died and Wang Hongxu personally trimmed and polished the text.
The first part to be finished were the normal and collective biographies (liezhuan 列傳), submitted to the throne in 1714. The treatises (zhi 志) and tables (biao 表) still had to be condensed, and were submitted to the throne in 1723. This version was known as Hengyun shanren Mingshi gao 橫雲山人明史稿 "Draft to a history of the Ming dynasty by Hermit Hengyun (i.e. Wang Hongxu)". It comprised 320 juan: 9 juan of imperial annals-biographies (benji 本紀), 77 juan of treatises, tables in 9 juan, and normal and collective biographies in 205 juan.
Basing on this version Zhang Tingyu and Zhu Shi 朱軾 (1665–1736, courtesy name Ruozhan 若瞻, style Keting 可亭) developed a final version submitted to the throne in 1739. It was printed by the imperial print office in the Hall of Military Glory (Wuyingdian 武英殿) of the Imperial Palace under the title of Mingshi. The whole compilation process had taken 95 years for completion, which is the longest necessary for any official book. The finished Mingshi consists of 332 juan of which 24 are imperial annals, 75 treatises, 13 tables, and 220 normal and collective biographies.
The treatises are dedicated to the themes astronomy (25-27 Tianwen zhi 天文志), the Five Processes (28-30 Wuxing zhi 五行志), calendar (31-39 Li zhi 曆志), administrative geography (40-46 Dili zhi 地理志), court rituals (47-60 Li zhi 禮志), court music (61-63 Yue zhi 樂志), court ceremonies (64 Yiwei zhi 儀衛志), state coaches and court robes (65-68 Yufu zhi 輿服志), selection and appointment of officials (69-71 Xuanju zhi 選舉志), state offices (72-76 Zhiguan zhi 職官志), food and commodities (77-82 Shihuo zhi 食貨志), hydraulic works (83-88 Hequ zhi 河渠志), military (89-92 Bing zhi 兵志), penal law (93-95 Xingfa zhi 刑法志), and also include an imperial bibliography (96-99 Yiwen zhi 藝文志).
The tables include lists of imperial princes (100-104 Zhuwang shibiao 諸王世表), ennobled commoners (105-107 Gongchen shibiao 功臣世表), relatives of empresses (108 Waiqi enze hou biao 外戚恩澤侯表), Counsellors-in-chief (109-110 Zaifu nianbiao 宰輔年表) and of the Six Ministers and the Censor-in-chief (111-112 Qiqing nianbiao 七卿年表).
The collective biographies cover the themes imperial consorts (113-114), the imperial house (115-120), princesses (121), benevolent officials (281 Xunli liezhuan 循吏列傳), Confucian scholars (282-284 Rulin liezhuan 儒林列傳), writers (285-288 Wenyuan liezhuan 文苑列傳), persons of loyal conduct (289-295 Zhongyi liezhuan 忠義列傳), persons of filial conduct (296-297 Xiaoyi liezhuan 孝義列傳), scholars living in seclusion (298 Yinyi liezhuan 隱逸列傳), magicians and diviners (299 Fangji liezhuan 方伎列傳), relatives of imperial consorts (300 Waiqi liezhuan 外戚列傳), outstanding women (301-303 Lienü zhuan 列女傳), eunuchs (304-305 Huanguan liezhuan 宦官列傳), court factions siding with the eunuchs (306 Yandang liezhuan 閹黨列傳), flatterers and imperial minions (307 Ningxing liezhuan 佞幸列傳), treacherous officials (308 Jianchen liezhuan 姦臣列傳), roaming bandits (309 Liuze liezhuan 流賊列傳, mainly Li Zicheng 李自成 and Zhang Xianzhong 張獻忠), native chieftains (310-319 Tusi liezhuan 土司列傳) and foreign countries (320-328 Waiguo liezhuan 外國列傳, 329-332 Xiyu liezhuan 西域列傳).
The primary sources for the compilation were official documents like the "veritable records" of the Ming, Mingshilu 明實錄, archival material, the so-called dibao 邸報 "Beijing gazette", a local history of the imperial capital, the statecraft encyclopaedia Da-Ming huidian 大明會典, memorials to the throne, local gazetteers, biographies, but also unofficial material like privately written histories or literary sources.
In some points the Mingshi is different from the older dynastic histories: There are illustrations in the calendar treatise (Tianwen zhi); the treatise about literature (Yiwen zhi) only lists books from the Ming period, and not all books in the imperial library; there is a table particularly dedicated to the seven highest state offices (Qiqing nianbiao); there are collective biographies reporting the life of political factions at the court (Yandang liezhuan), of "roaming bandits" (Liuzei liezhuan), and one of native chieftains (Tusi liezhuan) in southwest China.
On the other hand, there are also some shortcomings of which the Mingshi suffers, as the brevity of many passages, especially concerning the relations of the Ming government with the early Manchu empire, and the missing of the history of the Southern Ming 南明 (1644-1661) which has, of course, political reasons.
In order to redress those shortcomings some scholars have written additions to the Mingshi, like Liu Tingxie 劉廷燮 (Jianwen xunguo zhi jiyue biao 建文遜國之際月表, a monthly table of the Jianwen reign), Huang Dahua 黃大華 (Ming zaifu kaolüe 明宰輔考略, a treatise on the counsellors-in-chief; Ming qiqing kaolüe 明七卿考略, a treatise on the highest state offices), Wu Yingxie 吳廷燮 (Ming dufu nianbiao 明督撫年表, a table of the provincial governors) or Fu Yili 傅以禮 (Can Ming zaifu nianbiao 殘明宰輔年表, Can Ming datong li 慚明大統曆). All of these additions are included in the collection Ershiwu shi bubian 二十五史補編.
A textual critique to the Mingshi was arranged by Yu Minzhong 于敏中 (1714–1779, courtesy name Shuzi 叔子 or Zhongtang 重棠, style Naipu 耐圃) and Qian Rucheng 錢汝誠 (1722–1779, courtesy name Lizhi 立之, style Donglu 東麓) just after the book had been submitted to the throne, but was never printed along with the main text. It was only in the late 19th century when Wang Songwei 王頌蔚 (1849–1895, original name Shubing 叔炳, courtesy name Feiqing 芾卿, style Gaoyin 蒿隱) rearranged the remnants of this textual critique and compiled the Mingshi kaozheng junyi 明史考證攟逸, 42-juan long, which is included in the collectanea Jiayetang congshu 嘉業堂叢書.