The Shangshu 尚书 "Documents of the elder" , also called Shujing 书经 "Book of documents", is one of the five ancient Confucian classics (wujing 五经). It is a collection of speeches made by rulers and important politicians from mythical times to the mid of the Western Zhou period 西周 (11th cent - 770 BC). The Shangshuconsists of five parts. The first and shortest is the Tangshu 唐书 "Book of Tang" (i. e. the mythical Emperor Yao 尧); the second is the Yushu 虞书 "Book of Yu" (i. e. mythical Emperor Shun 舜); the third is the Xiashu 夏书 "Book of the Xia dynasty" 夏 (17th to 15th cent. BC), followed by the Shangshu 商书 "Book of the Shang dynasty" 商 (17th to 11th cent. BC), and finally the Zhoushu 周书 "Book of the Zhou dynasty" 周 (11th. cent.-221 BC).

From the language it can be seen that at least a part of the documents allegedly derived from the Shang period was written or at least revised during the early Zhou period, supposedly by historians at the court of the state of Song 宋, whose rulers were descendants of the Shang dynasty. Of the parts covering even more remote times, it might be that a part (especially the chapter Ganshi 甘誓 "The speech at Gan") originated in the Shang period, but most of it, like the Shundian 舜典 "The canon of Shun", the Gaoyao mo 皋陶谟 "The counsels of Gaoyao", or the famous chapter Yugong 禹贡 "The tribute of Yu", was written down in the early Eastern Zhou period.

The literary style of speech was very common during the Shang and early Zhou period. This can still be seen in the many bronze vessel inscriptions, a great part of which contain instructions by the king. Other, similar books are mentioned in the sources (books like the Sanfen 三坟, Wudian 五典, Basuo 八索, or Jiuqiu 九丘), but are long lost. There are six different types of speeches in the Shangshu: dian 典 "canons", mo 谟 "counsels", shi 誓 "speeches", gao 诰 "announcements", xun 训 "instructions", and ming 命 "charges". Yet not all chapters can be attributed to such a type of speech. Some titles are names of persons, some titles refer to the events described in the chapter. The latter are actually no speeches but a recording of events. Especially noteworthy is the chapter Yugong which is a description of how the mythical emperor Yu the Great tamed the floods and divided China into provinces, giving each province a quality lable for its soils, tributes and local products. This chapter must have been added later, at a point of time then China has obtained her traditional geographic extent, presumably the late Warring States战国 (5th cent.-221 BC) or even the Han period 汉 (206 BC-8 AD).

It is not possible to determine the exact size of a book called Shangshu prior to the Han period. Some authors speak of 20 chapters (pian), others of fourty. At least 30 of those chapters have been lost at an early point of time. Of the 28 chapters transmitted through the Han period 14 are not mentioned in earlier times. During the Han period it became common to arrange the chapters regularly under the title of a dynasty, except the title of the Yushu, which seems to be only created during the Han dynasty. The title "Shangshu" likewise appears during Han times; before, it was simply called Shu 书 "The Documents". The Shangshu was soon incorporated into the canon of the Five Confucian classics. Because Confucius as well as Mengzi孟子 venerated the saint kings of the past their speeches as recorded in theShangshu were an integral part of Confucian tradition.

It is told that during the Qin period 秦 (221-206 BC) when the First Emperor of Qin秦始皇 (r. 246/221-210 BCE) had burnt all "useless" books, including the Confucian writings, Master Fu Sheng 伏胜 mured the Shangshu into the walls of his house in order to hide it. Only a few decades later it was taken out of its hiding place, but only 28 chapters were preserved. This version was copied and distributed in the academies of the Confucian scribes in the regions of Qi 齐 and Lu 鲁, the ancient home of Confucius. There were thus three different versions of the Shangshucommon during the Han period, namely that of Ouyang Gao 欧阳高 (the tradition of Ouyang 欧阳氏学), Xiahou Sheng 夏侯胜 (the tradition of Xiahou Senior 大夏侯氏学), and that of Xiahou Jian 夏侯建 (the tradition of Xiahou Junior 小夏侯氏学). All of them were based on the book preserved by Fu Sheng, plus the chapter Taishi 泰誓 preserved by somebody else. The only greater difference seemed to be that the Ouyang tradition divided the chapter Pangeng 盘庚 into three parts. This is the so-called 100-chapter version (baipian Shangshu 百篇尚书), each chapter headed by a short introduction allegedly written by Confucius.
The book preserved by Fu Sheng was written in the chancery script (lishu 隶书) which became common during the late Zhou period and, with the unification of China by Qin, in the whole empire. It was therefore called the "modern script" or "new text" Shangshu (jinwen Shangshu 今文尚书, see new text classics). The Ouyang version served as the base for the stone inscriptions of the Confucian classics prepared during the Xiping reign 熹平 (172-177, the so-called Xiping stone classics Xiping shijing 熹平石经). In the course of time there were several fragments of the Shangshu discovered throughout the country which likewise had been hidden somewhere to survive the literary inquisition by the First Emperor. These versions appeared to be older and were written in an antique seal script style, and therefore called the "old script" or "old text" Shangshus (guwen Shangshu 古文尚书, see old text classics). These were the version detected in the walls of the Kong familiy’s manour in old Lu (the specimen was saved on the orders of Prince Gong of Lu 鲁恭王 and revised by Kong Anguo 孔安国, a descendant of Confucius), the version found by Prince Xian of Hexian 河间献王, the Zhongmi version 中秘, Zhang Ba’s 张霸 version in 200 chapters, and Du Linqi's version 杜林漆. The version from Confucius' hometown had 16 chapters more than Fu Sheng's modern script version. The clash between these versions led to the long-lasting strife between the adherents of the old text and the new text schools. The most widespread new textShangshu was Du Linqi's version which contained the same number of chapters like the new text versions. It was commented by the Han period scholars Wei Hong 卫宏, Jia Kui 贾逵, Ma Rong 马融, Zheng Xuan 郑玄 and Wang Su 王肃. Ma Rong and Zheng Xuan divided the chapters Pangeng and Taishi, and extracted the chapterKangwang zhi gao 康王之诰 from the chapter Guming 顾命, which made a total sum of 34 chapters. This version was the base for the classic incised into stone slabs during the Cao-Wei period 曹魏 (220-265; the so-called santi shijing 三体石经 "stone Classics in three character types").

The many different versions of the Shangshu – and of other Confucian classics – were lost during the disturbances of the Jin period 晋 (265-420). In the early 4th century a certain Mei Ze 梅赜 submitted a Shangshu written in chancery script on the base of ancient seal script characters (hence called liguding 隶古定 version, "fixed in chancery and ancient script"), together with a commentary (zhu 注) by Kong Anguo. It was thus an old text version, but with a length of 13 juan "scrolls" containing 33 chapters. It was, nevertheless, possible to reconstruct a part of the missing chapters from surviving fragments and the commentaries of Liu Xiang 刘向 and Zheng Xuan. This reconstructed version with 58 chapters is that which is transmitted until today, although it contains both new text and old text fragments side by side.

During the Tang period 唐 (618-907) Kong Yingda 孔颖达 wrote his famous commentary Shangshu zhengyi 尚书正义. It was, during the Song period 宋 (960-1279) printed together with the old commentary by Kong Anguo as Shangshu zhushu 尚书注疏, zhu being the Kong Anguo commentary, shu the Kong Yingda sub-commentary. A third time the Shangshu was incised in stone slabs was during the Tang period (Tang shijing 唐石经, the Tang Stone Classics), based on the modernkaishu 楷书 writing style version created by Wei Bao 卫包.

Cai Shen 蔡沈, a disciple of the great Neo-Confucian scholar Zhu Xi 朱熹, assembled all Song period commentaries on the Shangshu and published them as Shujizhuan书集传, in 6 juan. The Shangshu, or Shujing, as it was called from then on, had to be studied by all those wishing to pass the state examinations. During the Ming period明 (1368-1644), therefore, it was part of the book Wujing daquan 五经大全 "All about the Five Classics", which served as a kind of textbook for candidates of the state examinations.

The origin of Mei Ze's book was questioned at a very early point of time, and many scholars asked whether it was not a forgery. Wu Yu 吴棫 (Song), Wu Cheng 吴澄 (Yuan), Mei Zhuo 梅鷟 (Ming), Yan Ruoqu 阎若璩 and Hui Dong 惠栋 (both Qing period) called Mei Ze's 25-chapter Shangshu a phantastic concoction. Nevertheless nobody thought about eliminating doubtful parts or giving up the study of theShangshu at all. Scholars continued being attracted by its contents and studies all aspects of the Shangshu. Those were Wang Mingsheng 王鸣盛 (Shangshu hou'an 尚书后案), Sun Xingyan 孙星衍 (Shangshu jinguwen zhushu 尚书今古文注疏), Wang Xianqian 王先谦 (Shangshu Kong zhuan canzheng 尚书孔传参证), as well as the Republican scholars Wu Kaisheng 吴闿生 (Shangshu dayi 尚书大义) and Yang Yun 杨筠 (Shangshu hegu 尚书核诂). For modern scholars the Shangshu is of special interest as a source with a lot of material comparable with the Shangshu dazhuan 尚书大传, a parallel tradition of speeches from that period of time, as well as the many bronze vessel inscriptions only discovered in the 20th century.