Yue shu 樂書 is a chapter (ch. 24) of Sima Qian's 司馬遷 (c. 145-90 BCE)history book Shiji 史記, where it belongs to the eight treatises (shu 書). It must be read in unison with the treatise on rites, Li shu 禮書 (ch. 23). Large parts of the text are identical to the chapter on music Yueji 樂記 in the ritual Classic Liji 禮記. Some parts of the Yue shu might even be fragments of an earlier version of the Liji chapter not found in the transmitted version (Wang 2016).
Which parts of the Yue shu were written by Sima Qian himself (quite certainly the introductory section), and which were copied from other texts, has long been under discussion.
The fundamental proposition of the text, as that of other earlier texts on music, is that music (yue 樂) and rites (li 禮) constitute a dual unit and are applied to different spheres, but have to be combined in the right way in order to achieve good government and social harmony, or "decorum and orderliness under Heaven" (jirang er zhi tianxia 揖讓而治天下). In such a state, unruly people stay silent, the regional rulers keep to social propriety, weapons are unused, corporal punishment not applied, the people suffers no harm, and the Son of Heaven is satisfied.
Music unites people, while rites make decisions among them. Music brings harmony (he 和), and rites order (xu 序). Music serves to lead the comportment of people according to the principles of virtue (de 德) – it is prospective. Rites act as adjustment tools and norms for social behaviour and affections – they are long-term factors. Music emerges from the inner part of people (the heart) and therefore is an element of tranquillity (jing 靜), while rites, as an element from outside, are an expression of refinement (wen 文).
In a discussion with Binmou Jia 賓牟賈, Confucius explained that King Wu 周武王 of the Zhou dynasty 周 (11th cent.-221 BCE), who made use of the time-honoured "southern airs" (nanfeng 南風) of Emperor Shun 舜 played on the five-stringed zither (wu xian zhi qin 五弦之琴), while King Zhou 紂 of the Shang dynasty 商 (17th-11th cent. BCE), residing in Chaoge 朝歌 (meaning "[brief, i.e. unreliable] morning songs") applied the music of the "northern quarters" (beibin 北鄙, also translatable as "vanquished vulgarity"), and so lost his war against King Wu.
People creating music and rites must understand the aim of these two instruments of social governance. Harmony created by music will "transform the hundred things" (bai wu jie hua 百物皆化), and order created by rites will "make distinctions among the many [people and] objects" (qun wu jie bie 群物皆别). Music is created by Heaven (which is in unremitting movement), and rites by the earth (which is immovable in eternity). Both are thus unified expressions of the cosmos.
There are musical instruments like bells, drums, pipes, soundstones, flutes, shields and axes (for dancers), while music itself is expressed by straight and curved melodies (quxin 屈信) simple movements (fuyang 俯仰), the positions of dancers (zhuizhao 綴兆), and leisurely paces (shuji 舒疾). There are ritual tools like containers (fu 簠), pots (gui 簋), desks (zu 俎), beakers (dou 豆), prescriptions for social ranks (zhidu 制度), and recited texts (wenzhang 文章), while rites themselves can be seen in advancements and demotions (shengjiang 升降), upper and lower positions (shangxia 上下), socialisation (zhouxuan 周旋), and various ritual robes (tixi 裼襲). If social relations are without harm, the feeling of joy (le 樂) arouses. If manners and comportment are without wrong, respect and obedience are realised.
Even if music and rites are used in the argument as two sides of the same coin, it can be seen that music is in fact subordinated to the topic of rites. The latter is truly the hard factor for bringing society into great order.
Because music was an instrument of governance, it should not be played just for entertainment, but only to highlight certain occasions like success in great projects, or the state being at peace.
There are several books with the title Yueshu 樂書 "Book of music", the first one written by Xin Dufang 信都芳 (mid-7th cent.), and the second, a kind of encyclopaedia, by Chen Yang 陳暘 (1064-1128).