Zhang Lu 張魯 (d. 216 CE), courtesy name Zhang Qingqi 張公祺 (or 張公旗) was a Daoist master of the late Eastern Han period 東漢 (25-220 CE) and leader of an independent Daoist state. He was a grandson of the Daoist master Zhang Ling 張陵 and inherited the leadership of the Five Pecks of Grain School Wudoumi dao 五斗米道 (also called School of the Celestial Masters Tianshi dao 天師道).
Zhang hailed from Pei 沛 (modern Fengxian 豐县, Jiangsu) and succeeded Zhang Heng 張衡 in the position of Celestial Master. His mother was a practicioner of "nourishment of life" (yangsheng 養生) and is said to have been able to control the Way of the ghosts (guidao 鬼道). She also had contact with the family of Liu Yan 劉焉, the regional governor (mu 牧) of the province of Yizhou 益州 (modern Sichuan). Zhang Lu therefore was in 191 given the post of Commander supervisor of propriety (duyi sima 督義司馬). Together with Zhang Xiu 張修 he staged attacks on the territory of Su Gu 蘇固, governor (taishou 太守) of the commandery of Hanzhong 漢中. Zhang Xiu killed Su Gu, but was in turn killed by Zhang Lu who then took over his troops. When Liu Yan died, his son Liu Zhang 劉璋 inherited his post, but Zhang Lu broke the friendship with his house, a decision that led to the death of his mother, when the regional governor had her executed and the members of her household killed. Commander Pang Xi 龐羲 was made governor of Bajun 巴郡 and sent out to attack Zhang Lu. Yet the latter won victory over Pang Xi and founded his autonomous Daoist state in the region of Hanzhong.
In his instruction methods Zhang Lu followed those earlier established by Zhang Xiu, but increased them by further teachings. He adopted the title of "lord marshal" (shi jun 師君), and his followers were in the initial stages called "ghost troops" (guizu 鬼卒). When they had advanced in the studies of the Dao they were called "libationers" (jijiu 祭酒) and made commander of a military unit. Higher "officers" were given the title of "Great Libationer Headperson" (zhitou da jijiu 治頭大祭酒). These military leaders also served as local administrators of the civilian government.
The most important aspects of Zhang Lu's teaching was not to lie and deceit. Sick persons had first to confess their sins because it was believed that illness was the cause of misdoing. Wrongdoers were pardoned three times, and only a fourth delict was punished. In the case of smaller crimes it was possible to buy oneself free by doing public work, like repairing hundred paces of road. Zhang Lu's law also respected the ancient ritual text Yueling 月令 (see Liji), in which it was said that during Spring and Summer it was forbidden to kill, but also, to lose one'e temper when drunk. The state of Zhang Lu built public "charity granaries" (yishe 義舍) where grain and meat was stored to be distributed among by-passers. In order to forestall abuse it was publicly announced that those who consumed too much, would be tortured by evil spirits.
In the last decades of the Later Han period countless people tried to escaped the disturbances in the north China plane and came to Hanzhong, especially during the disturbances by Han Sui 韓遂 and Ma Teng 馬騰. Zhang Lu therefore sought the support of many tribal leaders of natives living in the mountainous regions nearby. With the help of a benevolent politics he did not only win over native leaders like Du Huo 杜濩, Pu Hu 朴胡 or Yuan Yue 袁約, but also the Chinese population in his state. Fortunately enough, the potentate Cao Cao 曹操 was not able to concern himself with the region of Hanzhong, and to ensure that Zhang Lu might be keep quiet he gave him the titles of Commandant appeasing the people (zhenmin zhonglang jiang 鎮民中郎將, or Commandant appeasing the barbarians Zhenyi zhonglang jiang 鎮夷中郎將) and governor of Hanning 漢寧.
For nearly thirty years Zhang Lu reigned over an independent state. Only in 215 Cao Cao decided to attack him with an army of 100,000 men. Zhang Lu's brother Zhang Wei 張衛 fortified the city of Yangping 陽平 from which he was to defend the realm of Hanzhong, but he was defeated by Cao Cao's troops, and Zhang Lu was forced to withdraw to the south, into the commandery of Bazhong 巴中, and not long thereafter submitted to Cao Cao. The warlord Cao Cao rewarded this cooperation with the title of "General suppressing the south" (zhennan jiangjun 鎮南將軍) and made him Marquis of Langzhong 閬中侯 (or Xiangping 襄平侯). Zhang Lu is therefore also known as Zhang Zhennan 張鎮南. All his five sons were given marquisates and were married with daughters of the house of Cao. A year later he died and was given the posthumous title of Marquis Yuan 原侯. He was buried in Yecheng 鄴城 (modern Linzhang 臨漳, Hebei), Cao Cao's old residence. After his submission to Cao Cao, the largest part of the people of Hanzhong moved to the north, from where the teachings of the Five Pecks of Grain School began spreading in northern China.
The main scripture of the Five Pecks of Grain School was the Daodejing 道德經 to which Zhang Lu wrote a commentary that made it easier to understand for the common people. This commentary is known as commentary Laozi Xiang'er zhu 老子想爾注. This commentary says that the "Way" (dao 道) was all-present in the shape of scattered "breath" (qi 氣). The densest accumulation of "breath" was in the shape of the Taishang laojun 太上老君 "Old lord in the supreme height" (i. e. Laozi 老子) who resided in the Kunlun Range 昆侖. The essence of the Way (daojing 道精) was distributed among the ten thousand things that, in turn, were so part of one great unity. All people in a society were to obey the meaning of the Dao and had to learn the truth of the Way. They were to keep the obediences and to preserve the Dao.
One of the highest expressions of the Dao was life itself, and therefore, it was the duty of the practitioner to preserve life as something that the Dao has given as a kind of reward for sincere behaviour (dao she sheng yi shang shan 道設生以賞善). The adept had to accumulate good deeds to gain merits (ji shan cheng gong 積善成功), and to accumulate the essence of the Dao to become immortal (ji jing cheng xian 積精成神). This was the duty of the common man as well as that of a ruler. A ruler had to cultivate virtue, and his ministers were to serve their ruler in the spirit of the Dao. When this was done in a perfect way, the "Great Peace" would come (taiping zhi yi 太平至矣). Zhang Lu also attacked the Confucians whose teachings were "evil" (xie 邪) and wrong (wei 偽). He criticized the luxury at the court and in the state offerings, and also the belief in apocryphal texts though to reveil the truth from omina and portents.
In 1308, Zhang Lu was bestowed the canonical title of Taiqing zhaohua guangde zhenjun 太清昭化廣德真君 "Perfect Lord of the enlightened vast virtue of the Great Purity".