The Book of Documents (Chinese: 書經; pinyin: Shūjīng; Wade–Giles: Shu King) is one of the Five Classics of ancient Chinese literature.  It is a collection of rhetorical prose attributed to figures of ancient China, and served as the foundation of Chinese political philosophy for over two millennia. 
 The Book of Documents was the subject of one of China's oldest literary controversies, between proponents of different versions of the text. A version was preserved from Qin Shi Huang's burning of books and burying of scholars by scholar Fu Sheng, in 29 chapters (piān 篇). This group of texts were referred to as "Modern Script" (jīnwén 今文), because they were written with the script in use at the beginning of the Western Han dynasty. A longer version of the Documents was said to be discovered in the wall of Confucius's family estate in Qufu by his descendant Kong Anguo in the late 2nd century BC. This new material was referred to as "Old Script" (gǔwén 古文), because they were written in the script that predated the standardization of Chinese script during the Qin. Compared to the Modern Script texts, the "Old Script" material had 16 more chapters. However, this seems to have been lost at the end of the Eastern Han dynasty, while the Modern Script text enjoyed circulation, in particular in Ouyang Gao's [zh] study, called the Ouyang Shangshu (歐陽尚書). This was the basis of studies by Ma Rong and Zheng Xuan during the Eastern Han.
 In 317 AD, Mei Ze presented to the Eastern Jin court a 58-chapter (59 if the preface is counted) Book of Documents as Kong Anguo's version of the text.
This version was accepted, dispite the doubts of a few scholars, and later was canonized as part of Kong Yingda's project. It was only in the 17th century that Qing dynasty scholar Yan Ruoqu demonstrated that the "Old Script" were actually fabrications "reconstructed" in the 3rd or 4th centuries AD.
 In the transmitted edition, texts are grouped into four sections representing different eras: the legendary reign of Yu the Great, and the Xia, Shang and Zhou dynasties. The Zhou section accounts for over half the text.  Some Modern Script chapters are among the earliest examples of Chinese prose, recording speeches from the early years of the Zhou dynasty in the late 11th century BC.  Although the other three sections purport to record earlier material, most scholars believe that even the New Script chapters in these sections were composed later than those in the Zhou section, with chapters relating to the earliest periods being as recent as the 4th or 3rd centuries BC.
 The history of the various versions of the Documents is particularly complex, and has been the subject of a long-running literary and philosophical controversy.
 According to a later tradition, the Book of Documents was compiled by Confucius (551–479 BC) as a selection from a much larger group of documents, with some of the remainder being included in the Yizhoushu.
However, the early history of both texts is obscure.
Beginning with Confucius, writers increasingly drew on the Documents to illustrate general principles, though it seems that several different versions were in use.
 Six citations of unnamed Documents chapters appear in the Analects.
Although Confucius invoked the pre-dynastic emperors Yao and Shun, and figures from the Xia and Shang dynasties, he complained of the lack of documentation prior to the Zhou.
Increasing numbers of citations, some with titles, appear in 4th century BC works such as the Mencius, Mozi and Commentary of Zuo.
These authors favoured documents relating to Yao, Shun and the Xia dynasty, chapters now believed to have been written in the Warring States period.
The chapters currently believed to be the oldest (mostly relating to the early Zhou) were little used by Warring States authors, perhaps due to the difficulty of the archaic language or a less familiar world-view.
Fewer than half the passages quoted by these authors are present in the received text.
Authors such as Mencius and Xunzi, while quoting the Documents, refused to accept all of it as genuine.
Their attitude contrasts with the reverence that would be shown to the text in the Han dynasty, when its compilation was attributed to Confucius.
 Many copies of the work were destroyed in the Burning of Books during the Qin dynasty.
Fu Sheng reconstructed part of the work from hidden copies in the late 3rd to early 2nd century BC, at the start of the succeeding Han dynasty. The texts that he transmitted were known as the "Modern Script" (今文 jīn wén) because it was written in the clerical script.
It originally consisted of 29 chapters, but the "Great Speech" 太誓 chapter was lost shortly afterwards and replaced by a new version. The remaining 28 chapters were later expanded into 30 when Ouyang Gao divided the "Pangeng" chapter into three sections.
 During the reign of Emperor Wu, renovations of the home of Confucius are said to have uncovered several manuscripts hidden within a wall, including a longer version of the Documents.
These texts were referred to as "Old Script" because they were written in the pre-Qin seal script.
They were transcribed into clerical script and interpreted by Confucius' descendant Kong Anguo.
Han dynasty sources give contradictory accounts of the nature of this find. According to the commonly repeated account of the Book of Han, the "Old Script" texts included the chapters preserved by Fu Sheng, another version of the "Great Speech" chapter and some 16 additional ones.
It is unclear what happened to these manuscripts. According to the Book of Han, Liu Xiang collated the Old Script version against the three main "Modern Script" traditions, creating a version of the Documents that included both groups. This was championed by his son Liu Xin,
who requested in a letter to Emperor Ai the establishment of a boshi position for its study. But this did not happen. Most likely, this edition put together by the imperial librarians was lost in the chaos that ended the Western Han dynasty, and the later movement of the capital and imperial library. 
 A list of 100 chapter titles was also in circulation; many are mentioned in the Records of the Grand Historian, but without quoting the text of the other chapters.
 The shu were designated one of the Five Classics when Confucian works made official by Emperor Wu of Han, and jīng ('classic') was added to its name.
The term Shàngshū 'venerated documents' was also used in the Eastern Han.
The Xiping Stone Classics, set up outside the imperial academy in 175–183 but since destroyed, included a Modern Script version of the Documents.
Most Han dynasty scholars ignored the Old Script version, and it disappeared by the end of the dynasty.
 A version of the Documents that included the "Old Script" texts was allegedly rediscovered by the scholar Mei Ze during the 4th century, and presented to the imperial court of the Eastern Jin.
His version consisted of the 31 modern script texts in 33 chapters, and 18 additional old script texts in 25 chapters, with a preface and commentary purportedly written by Kong Anguo. This was presented as Guwen Shangshu 古文尚書, and was widely accepted. It was the basis of the Shàngshū zhèngyì (尚書正義 'Correct interpretation of the Documents') published in 653 and made the official interpretation of the Documents by imperial decree. The oldest extant copy of the text, included in the Kaicheng Stone Classics (833–837), contains all of these chapters.
 Since the Song dynasty, starting from Wu Yu (吳棫), many doubts had been expressed concerning the provenance of the allegedly rediscovered "Old Script" texts in Mei Ze's edition. In the 16th century, Mei Zhuo (梅鷟) published a detailed argument that these chapters, as well as the preface and commentary, were forged in the 3rd century AD using material from other historical sources such as the Zuo Commentary and the Records of the Grand Historian. Mei identified the sources from which the forger had cut and pasted text, and even suggested Huangfu Mi as a probable culprit. In the 17th century, Yan Ruoqu's unpublished but widely distributed manuscript entitled Evidential analysis of the Old Script Documents (尚書古文疏證; Shàngshū gǔwén shūzhèng) convinced most scholars that the rediscovered Old Script texts were fabricated in the 3rd or 4th centuries.
 New light has been shed on the Book of Documents by the recovery between 1993 and 2008 of caches of texts written on bamboo slips from tombs of the state of Chu in Jingmen, Hubei. These texts are believed to date from the late Warring States period, around 300 BC, and thus predate the burning of the books during the Qin dynasty. The Guodian Chu Slips and the Shanghai Museum corpus include quotations of previously unknown passages of the work. The Tsinghua Bamboo Slips includes a version of the transmitted text "Golden Coffer", with minor textual differences, as well as several documents in the same style that are not included in the received text.  The collection also includes two documents that the editors considered to be versions of the Old Script texts "Common Possession of Pure Virtue" and "Command to Fu Yue". Other authors have challenged these straightforward identifications.
 In the orthodox arrangement, the work consists of 58 chapters, each with a brief preface traditionally attributed to Confucius, and also includes a preface and commentary, both purportedly by Kong Anguo.
An alternative organization, first used by Wu Cheng, includes only the Modern Script chapters, with the chapter prefaces collected together, but omitting the Kong preface and commentary.
In addition, several chapters are divided into two or three parts in the orthodox form.
 With the exception of a few chapters of late date, the chapters are represented as records of formal speeches by kings or other important figures.
Most of these speeches are of one of five types, indicated by their titles:
 Classical Chinese tradition lists six types of Shu, beginning with dian 典, Canons (2 chapters in the Modern corpus).
 According to Su Shi (1037–1101), it is possible to single out Eight Announcements of the early Zhou, directed to the Shang people. Their titles only partially correspond to the modern chapters marked as gao (apart from the nos. 13, 14, 15, 17, 18 that mention the genre, Su Shi names nos. 16 "Zi cai", 19 "Duo shi" and 22 "Duo fang").
 As pointed out by Chen Mengjia (1911–1966), announcements and commands are similar, but differ in that commands usually include granting of valuable objects, land or servants to their recipients.
 Guo Changbao 过常宝 claims that the graph for announcement (誥), known since the Oracle bone script, also appears on two bronze vessels (He zun and Shi Zhi gui 史[臣+舌]簋), as well as in the "six genres" 六辞 of the Zhou li[clarification needed]
 In many cases a speech is introduced with the phrase Wáng ruò yuē (王若曰 'The king seemingly said'), which also appears on commemorative bronze inscriptions from the Western Zhou period, but not in other received texts.
Scholars interpret this as meaning that the original documents were prepared scripts of speeches, to be read out by an official on behalf of the king.
 The chapters are grouped into four sections representing different eras: the semi-mythical reign of Yu the Great, and the three ancient dynasties of the Xia, Shang and Zhou.
The first two sections – on Yu the Great and the Xia dynasty – contain two chapters each in the Modern Script version, and though they purport to record the earliest material in the Documents, from the 2nd millennium BC, most scholars believe they were written during the Warring States period.
The Shang dynasty section contains five chapters, of which the first two – the "Speech of King Tang" and "Pan Geng" – recount the conquest of the Xia by the Shang and their leadership's migration to a new capital (now identified as Anyang).
The bulk of the Zhou dynasty section concerns the reign of King Cheng of Zhou (r. c. 1040–1006 BC) and the king's uncles, the Duke of Zhou and Duke of Shao.
The last four Modern Script chapters relate to the later Western Zhou and early Spring and Autumn periods.
 Not all of the Modern Script chapters are believed to be contemporaneous with the events they describe, which range from the legendary emperors Yao and Shun to early in the Spring and Autumn period.
Six of these chapters concern figures prior to the first evidence of writing, the oracle bones dating from the reign of the late Shang king Wu Ding.
Moreover, the chapters dealing with the earliest periods are the closest in language and focus to classical works of the Warring States period.
 The five announcements in the Documents of Zhou feature the most archaic language, closely resembling inscriptions found on Western Zhou bronzes in both grammar and vocabulary.
They are considered by most scholars to record speeches of King Cheng of Zhou, as well as the Duke of Zhou and Duke of Shao, uncles of King Cheng who were key figures during his reign (late 11th century BC).  They provide insight into the politics and ideology of the period, including the doctrine of the Mandate of Heaven, explaining how the once-virtuous Xia had become corrupt and were replaced by the virtuous Shang, who went through a similar cycle ending in their replacement by the Zhou.
The "Timber of Rottlera", "Numerous Officers", "Against Luxurious Ease" and "Numerous Regions" chapters are believed to have been written somewhat later, in the late Western Zhou period.
A minority of scholars, pointing to differences in language between the announcements and Zhou bronzes, argue that all of these chapters are products of a commemorative tradition in the late Western Zhou or early Spring and Autumn periods.
 Chapters dealing with the late Shang and the transition to Zhou use less archaic language.
They are believed to have been modelled on the earlier speeches by writers in the Spring and Autumn period, a time of renewed interest in politics and dynastic decline.
The later chapters of the Zhou section are also believed to have been written around this time.
The "Gaozong Rongri" chapter comprises only 82 characters, and its interpretation was already disputed in Western Han commentaries.
Pointing to the similarity of its title to formulas found in the Anyang oracle bone inscriptions, David Nivison proposed that the chapter was written or recorded by a collateral descendant of Wu Ding in the late Shang period some time after 1140 BC.
 The "Pan Geng" chapter (later divided into three parts) seems to be intermediate in style between this group and the next. It is the longest speech in the Documents, and is unusual in its extensive use of analogy.  Scholars since the Tang dynasty have noted the difficult language of the "Pan Geng" and the Zhou Announcement chapters. Citing the archaic language and worldview, Chinese scholars have argued for a Shang dynasty provenance for the "Pan Geng" chapters, with considerable editing and replacement of the vocabulary by Zhou dynasty authors accounting for the difference in language from Shang inscriptions.
 The chapters dealing with the legendary emperors, the Xia dynasty and the transition to Shang are very similar in language to such classics as the Mencius (late 4th century BC).
They present idealized rulers, with the earlier political concerns subordinate to moral and cosmological theory, and are believed to be the products of philosophical schools of the late Warring States period.
Some chapters, particularly the "Tribute of Yu", may be as late as the Qin dynasty.
 When Jesuit scholars prepared the first translations of Chinese Classics into Latin, they called the Documents the "Book of Kings", making a parallel with the Books of Kings in the Old Testament. They saw Shang Di as the equivalent of the Christian God, and used passages from the Documents in their commentaries on other works.