Zhenzhongshu 枕中書 "Book in the Headrest" is an early Daoist text attributed to the Eastern Jin period 東晉 (317-420) writer Ge Hong 葛洪. The book is also called Zhenzhongji 枕中記 and has the canonical title Yuanshi shangzhen zhongxian ji 元始上真眾仙記 "The many immortals of the supreme perfectness of the primordial beginning", short Zhongzhenji 眾真記 "The many perfects" or Zhongxianji 眾仙記 "The many immortals". It is a collection of stories of immortals and the way how they obtained a higher degree of consciousness. The book begins with an account of Ge Hong's nocturnal encounter of the Great perfect king of the mysterious capital (Xuandu taizhen wang 玄都太真王) on Mt. Luofu 羅浮山. The god conferred two books on him, the Zhenshu 真書 "The book of perfects" and the Zhenji 真記 "Records of perfects".
The Zhenshu describes how Pan Gu 盤古 (Yuanshi tianwang 元始天王 Celestial king of the primordial beginning) joined his breath (qi 氣) and essences (jing 精) with the Jade girl of the great mystery (Taixuan yunü 太玄玉女 or 太玄聖母 "Holy mother of the great mystery") to give birth to the Heavenly Emperor (Tianhuang 天皇). From this unison, the whole world is created with all deities, mythological emperors and their descendants.
The Zhenji narrates the lives of Daoist immortals and practicioners and contains also some biographies of mythological emperors and their counsellors, like the Yellow Emperor 黃帝. The biographies reach from the oldest times until that of contemporaries like Xu Mi 許謐 or Xu Hui 許翽.
It was believed for a long time that Ge Hong was the author of the book. It was only Qing period 清 (1644-1911) scholars that doubted this fact. Yu Jiaxi 余嘉錫 identified the Zhenzhongshu as identical to the Zhongxianji. The title Zhenzhongji seems to have been in use since the Ming period 明 (1368-1644). Ren Jiyu 任繼愈 assumed that the book dated from the Southern Dynasties period, yet it seems rather plausible that it has been written comtemporarily with the Zhengao 真誥, which is a product of the Shangqing tradition of Daoism forming during the late Jin period. The Daoist Canon Daozang 道藏 includes the Zhenzhongji and the Zhenzhongjing 枕中經. The first is a product of Sun Simiao 孫思邈 and deals mainly with methods to prolong life and strengthen the health. For the Zhenzhongjing, no author is mentioned. It speaks of the strengthening of the two souls, the hun 魂 and the po 魄, how to get rid of disease and sickness, and how to repell evil spirits. Both books have nothing to do with the Zhenzhongshu attributed to Ge Hong. This book is given the long title of Yuanshi shangzhen zhongxian ji in the Daozang. In the reprint series Shuofu 說郛 and the Siku tiyao 四庫提要, it is called Zhenzhongshu. It is not included in the Siku quanshu 四庫全書.